"; exit; } //if email is not empty, check if its a valid email else{ if (!validate_email($_POST['email'])){ //echo "Thank you for registering. You can now login."; echo "The email address ".$_POST['email']." is invalid. Please go back and enter a valid email address."; exit(); } } //user entered all fields correctly $query2 = "SELECT * FROM `users` WHERE email='$email'"; $result2 = mysql_query($query2); //the email is found! if (mysql_num_rows($result2) > 0){ //echo 'we found your email'; $row= mysql_fetch_assoc($result2); $question = $row['question']; $answer = $row['answer']; $email = $row['email']; include ("secret.php"); exit(); } //the email is not found else{ echo $_POST['email'] . " is not in the database please go back and enter the email address that is in our database."; exit(); } } ?> Please enter your email below:
Email: