I have used following code to ensure email address provided on signup are valid.
if (!preg_match("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)){
$msg = $msg."Email Id Not Valid, Please Enter The Correct Email Id .<BR>";
$status = "NOTOK";
}
I entered a standard email myemail@gmail.com
but it's flagging it as invalid.
Please help me why it is flagging it.