Jump to content

Recommended Posts

Hi. am new to php. followed a tutorial to do an email verification but it isnt set to check the db for exisiting emails. want it so only one email can be registered per person. can anyone help?

 

If u want to see my code see attached file

 

 

Something like the following should work for you. You may want to tweak it.

 

$check = mysql_query("SELECT email FROM temp_members_db WHERE email = '$email'")
$check2 = mysql_num_rows($check);

//if the name exists it gives an error
if ($check2 != 0) {
header("refresh: 5; signup_ac.php");
die('Sorry, the email <b>'. $email .'</b> is already in use.');
}

Hi. am new to php. followed a tutorial to do an email verification but it isnt set to check the db for exisiting emails. want it so only one email can be registered per person. can anyone help?

 

If u want to see my code see attached file

 

 

Something like the following should work for you. You may want to tweak it.

 

$check = mysql_query("SELECT email FROM temp_members_db WHERE email = '$email'")
$check2 = mysql_num_rows($check);

//if the name exists it gives an error
if ($check2 != 0) {
header("refresh: 5; signup_ac.php");
die('Sorry, the email <b>'. $email .'</b> is already in use.');
}

 

 

Hi. thanks. that looks pretty good but not really working. It just seems to have a blank page.it is working as in it doesnt send the info to the database. Just want it so it also redirects to a new page say bla.html. any ideas?

it doesnt send the info to the database.

 

Did you change the field and table names to match yours?

 

Just want it so it also redirects to a new page say bla.html. any ideas?

 

he does that, just change signup_ac.php to your desired redirect location like:

header(refresh:5; url='blah.html');

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.