12-20-2007, 04:30 PM
|
#11 (permalink)
|
|
The Reckoner
Join Date: Sep 2007
Posts: 437
Thanks: 22
|
You've already got your solution, but I thought I'd mention the nice filter_* methods that you can use to achieve email validation, everyone always seems to overlook it:
PHP Code:
if (!filter_var('karl@talkphp.com', FILTER_VALIDATE_EMAIL)) { echo "Email is invalid!"; }
That's all there is to it, you can even santize your data with the same function.
__________________
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
|
|
|
|