php registration form - limit emails

Waiter

New Member
i want to restrict certain emails to my website.an example would be that i only want people with gmail accounts to register to my website.\[code\]{ /* Check if valid email address */ $regex = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*" ."@[a-z0-9-]+(\.[a-z0-9-]{1,})*" ."\.([a-z]{2,}){1}$"; if(!eregi($regex,$subemail)){ $form->setError($field, "* Email invalid"); } $subemail = stripslashes($subemail); }\[/code\]this is what i have so far to check if its a valid email.
 
Back
Top