i have a registration form taht requires a valid email.
it works and everything is fine, but sometimes people would have emails like this ==> email@students.fsu.edu or email@blahblah.blah.blah.blah.net
or something like that
my code is
if ( !eregi('^[a-zA-Z0-9._-]+@[a-zA-Z0-9-]+\.[a-zA-Z.]{2,5}$', $email_address ) ) {
$errors[] = "The email address you provided must be valid!";
}
it only works when users have a simple address like email@gmail.com
how do i make it so it can accept all kinds of email?