Email Validation Using PHP

by raveendran 2010-01-28 18:19:37

Email Validation in php
<?php
function isValidEmail($email){
$pattern = "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$";
if (eregi($pattern, $email)) {
return 'true';
}
else {
return 'false';
}
}
?>

Tagged in:

845
like
0
dislike
0
mail
flag

You must LOGIN to add comments