Serverside E-Mail Address Validation (Rated 4.5)Description:
This script will validate an email address to be valid or not. How you deal with either case is entirely up to you! Code starts here
<?PHP
// Get this email from anywhere, forms etc
$email="someone@somewhere.com";
$regEx = "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$" ;
if (eregi($regEx, $email))
{
// Email is valid
} else {
// Email Isn't Valid
}
?>
Submitted by Devscripts on 13-02-2003 23:41 |