FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Validate email address with PHP

 


scompany
After about hour surfing PHP documentation, I finali successed to create script that chech email address:

Code:

$email = "name@domain.com";
if (ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$", $email)){
//code if address is correct
}
else {
// code if email is not correct
}

mathiaus
I can find a better one within 2 minutes. And what is the point of posting it here?
Unless its unique which it isnt or was requested (again a no!) it shouldnt be posted Evil or Very Mad
scompany
Sorry! Feel free to delete!
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.