Reputation: 575
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
}
Upvotes: 0
Views: 648
Reputation: 20401
You've probably made something wrong, because it does recognize such adress as invalid. Just try by yourself.
Upvotes: 2