I was just wondering how I would go about getting a message to echo at the bottom of my signup page to let the user know that their email is in use.
$sql_email = "SELECT email FROM user WHERE email='$email'";
$result_email = mysqli_query($conn, $sql_email);
$emailcheck = mysqli_num_rows($result_email);
if ($emailcheck > 0) {
header("Location: ../signup.php?error=email");
echo("an account with that email is already created, please enter a different email.</a>");
exit();
}
this code sends the user to signup.php?error=email where they can sign up again but I would like a message to echo below the sign-up form saying: "an account with that email is already created, please enter a different email." I tried using echo to do this but nothing appears on the page.