check email - registration script , help
Posted: Sun Nov 24, 2002 5:31 pm
hello people
I have a user registration script which allow user to register to become a member. I basically have a complete working script now, however, i would like to add one more check to it.
the original script checks for if the username is exist, if there is username, first name, last name inputs in the field, if it's a valid email address before registering user, however, i need to also check that if the email address has been registered before and i got stuck here...
here is part of my email exist checking script:
however, this script doesnt check the whole email database, it only check the first row.
could somebody please point me to the right direction?
thank you
I have a user registration script which allow user to register to become a member. I basically have a complete working script now, however, i would like to add one more check to it.
the original script checks for if the username is exist, if there is username, first name, last name inputs in the field, if it's a valid email address before registering user, however, i need to also check that if the email address has been registered before and i got stuck here...
here is part of my email exist checking script:
Code: Select all
....
//email already exists?
$result = mysql_query("SELECT mgremail FROM mgrs where mgremail = '$mgremail'");
elseif (mysql_num_rows($result) > 1)
{
print "Your email address has already registered in our database, are you sure you need to
register again? Please use 'forgot password' to retrieve your information. Thank you!";
exit;
}
...could somebody please point me to the right direction?
thank you