View Single Post
Old 12-20-2007, 04:30 PM   #11 (permalink)
Karl
The Reckoner
Advanced Programmer Top Contributor 
 
Karl's Avatar
 
Join Date: Sep 2007
Posts: 437
Thanks: 22
Karl is on a distinguished road
Default

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.
Karl is offline  
Reply With Quote
The Following 2 Users Say Thank You to Karl For This Useful Post:
Andrew (12-20-2007), thegrayman (12-28-2007)