PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
$check_email = @mysql_query("SELECT MAIL FROM user_auth ");
$check_email = mysql_fetch_array($check_email);
$check_email = check_email ['MAIL];
if($check_email == $email){
return "An error has occured. Sorry, but that E-mail has already been used".
}
?>
<?php
$check_email = @mysql_query("SELECT MAIL FROM user_auth ");
$check_email = mysql_fetch_array($check_email);
$check_email = check_email ['MAIL];
if($check_email == $email){
return "An error has occured. Sorry, but that E-mail has already been used".
}
?>
Ok I didn't catch that, and the email comes from another part of the pages code.
What I am trying to get it to do is to go to the database search the table users and the column MAIL and see how many times the user's email has been used. If the users' email has been used more than 3 times. They it doesn't allow that e-mail, but if it come back under 3 times used. then they can use that e-mail to signup.
$mysql_email = mysql_real_escape_string($email);
$sql = "SELECT `MAIL` FROM `userauth` WHERE `MAIL`= '$mysql_email'";
$result = mysql_query($sql);
$number_of_rows_returned = mysql_num_rows();
if ($number_of_rows_returned >= 3) {
return "An error has occured. Sorry, but that E-mail has already been used".
}
Last edited by tecktalkcm0391 on Mon May 29, 2006 11:47 am; edited 1 time in total
tecktalkcm0391,
I added the do not bump warning for a reason. Please don't remove it.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:4. All users of any level are restricted to bumping (as defined here) any given thread within twenty-four (24) hours of its last post. Non-trivial posts are not considered bumping. A bump post found in violation will be deleted, and you may or may not recieve a warning. Persons bumping excessively be considered as spammers and dealt with accordingly.