Code has been added to clipboard!
Code for Validating PHP Email
Example
if (empty($_POST["email"])) {
$email_error = "Email missing.";
} else {
$email = test_input($_POST["email"]);
// check e-mail pattern
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$email_error = "Email invalid.";
}
}