How to check email address validity

This will validate most email address.

if (ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@+([_a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]{2,200}\.[a-zA-Z]{2,6}$", $email)) {
echo 'Email valid';
} else {
echo 'Email invalid;
}

Comments

Popular posts from this blog

The Importance Outdoors Activities For Children (cont.)

Control your heart and your feelings...