Question : how to validate an email field using php
Answered by : scary-sable-ym9wpe55d3li
<?php
$email = "[email protected]";
// Validate email
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
echo("$email is a valid email address");
}
else{
echo("$email is not a valid email address");
}
?>
Source : https://www.tutorialspoint.com/how-to-validate-an-email-address-in-php | Last Update : Tue, 04 Aug 20
Question : valide email php
Answered by : joyous-jaguar-ctnnk5onv031
$email = "[email protected]";
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $emailErr = "Email invalide";
}
Source : | Last Update : Mon, 18 May 20
Question : validate email in php
Answered by : vi-ly
{"tags":[{"tag":"p","content":"Validate email in PHP"},{"tag":"textarea","content":" if (filter_var($username, FILTER_VALIDATE_EMAIL)) { /* If that is email */\n $conditions['email'] = $username;\n } else {\t/* If that not email */\n $conditions['phone_number'] = $username;\n }","code_language":"php"}]}
Source : | Last Update : Tue, 18 Apr 23