Skip to content Skip to sidebar Skip to footer

PHP Validate Email Address

Reading Time: < 1 minute

How to validate Email address using php.This can be easily done by php regular expressions. Here is a email validation example.Only you have to call to this validation function and it will return it true or false.


Simply you can do this like this.

if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email))
{
    echo "Invalid Email Address";
}