Jump to content

[SOLVED] please help me with the email validation


littlepeg

Recommended Posts

:) hi everybody, would you please have a look at these code and help me to solve this problem. Any help would be grately and appreciated. When I tried to validate the email for the registration form. There is an error message as follows:

  Warning: eregi() [function.eregi]: REG_ERANGE in C:\wamp\www\snyp\registration.php on line 64

 

The codes are below:

 

if (!empty($_POST['email'])) {

if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-

            ]+)*(\.[a-z]{2,3})$", $psd)){

$errors[] = 'Sorry, the email is not valid';

}

else {

$psd = $_POST['email'];

}

    } else {

$errors[] = 'You forgot to enter your email.';

}

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.