http://php-guidelines.blogspot.com/2015/02/form-validation.html:
replace following if statement of email :
<?php
if (empty($_POST["email"])) {
$emailErr = "Email is required";
} else {
$email = test_input($_POST["email"]);
// check if e-mail address is valid or not
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$emailErr = "Invalid email format";
}
}
?>
No comments:
Post a Comment