Is there an alternative to filter_var($email, FILTER_VALIDATE_EMAIL)
?
Because it doesn't seem to recognize cases such us american@hotmail (without .com for instance) as invalid address.
MY CODE:
$c = 0;
$email = $_POST["ml"];
if(!filter_var($email, FILTER_VALIDATE_EMAIL)){
$c = 1; // Email non valida
}
You've probably made something wrong, because it does recognize such adress as invalid. Just try by yourself .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.