Hello Everyone!
I am working on an assignment for my class that is due tomorrow. I am trying to set up my page to look like this: https://yorktown.cbe.wwu.edu/sandvig/mis314/assignments/a04/Validate.php?
My e-mail address section is not working. It says there is an error i my code. I have attached a utilities page to include in my code. Would someone be willing to tell me why my code isn’t working and where I went wrong?
Here is my utilities section for the email:
function fIsEmail($email) {
$email = trim($email);
// acceptable email address format. This simplified pattern will
// allow some invalid addresses.
// i at end of pattern indicates case-insensitive match
$pattern = “/^[^@]+@[a-z0-9.]+.[a-z]{2,4}$/i”;
//returns count of matching strings
return (preg_match($pattern, $email));
}
And here is my php code in relation to the validate email section:
Any help would be awesome! Thank you!