Wallpapers Forums Login

Email Address Validation Function PHP Code Form HTML Check Correct Valid

im writing a script with a form and i want to write a piece of code that will check for a valid email address using php programming, but i am not very familiar with the syntax, i was wondering if you guys can help me figure out how i can write a snippet of a function which verifies and confirms that the email address entered by a user on an HTML form is correct and valid. so basically i need a PHP email vadliation function i can use.
astad Mon Apr 26, 2010
how about if you have a really complicated email how can yo be use its good/
wahoo Thu Jun 21, 2007
try this function:

CODE:
function check_email($email) {
$validation = TRUE;
if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email)) {
$validation = FALSE;
}
return $validation;
}


Related Content

Information

Share

wallpaperama | Wallpapers | Forums | Terms Of Service

copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Mon May 06, 2013 (-8 GMT)
Powered by: Webune Forums V5