/ Published in: PHP
E-mail validation is perhaps the most used validation in web forms, this code will validate email address and also optionally check the MX records of the domain provided in email address to make email validation more robust.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function is_valid_email($email, $test_mx = false) { if($test_mx) { } else return true; else return false; }