The easiest and safest way to check email address validity is to use the php embedded function filter_var() :
1 2 3 4 | if (!filter_var( $email , FILTER_VALIDATE_EMAIL)) { //invalid email } |
The easiest and safest way to check email address validity is to use the php embedded function filter_var() :
1 2 3 4 | if (!filter_var( $email , FILTER_VALIDATE_EMAIL)) { //invalid email } |