[nycphp-talk] validating email address
selyah
selyah1 at yahoo.com
Fri Dec 14 10:55:48 EST 2007
Hello all:
I have created a database which is working fine and i am now validating the inputted data. I am stuck on validating the email address. I am using the validating statement below, and it is not working. when i enter the email incorrectly, it is still entered into the database, and the errror msg is not printed. can anyone see the error of my ways. thanks
if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST['email'])) { echo "Valid email address."; }else { echo "Invalid email address.";}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20071214/5b1c1bc1/attachment.html>
More information about the talk
mailing list