diff --git a/Courses.php b/Courses.php index 3f544d7..5e4d571 100644 --- a/Courses.php +++ b/Courses.php @@ -494,6 +494,10 @@ include 'Header.php'; echo '
' . $_SESSION['info_Courses_student'] . ''; $_SESSION['info_Courses_student'] = null; } + if (isset($_SESSION['info_signup'])) { + echo '
'; + $_SESSION['info_signup'] = null; + } ?>

diff --git a/Script.php b/Script.php index 3db0e5f..3bff38d 100644 --- a/Script.php +++ b/Script.php @@ -70,10 +70,7 @@ if (!empty($_POST["form_signup"])) { // check if email is taken $result = mysqli_query($con, "SELECT * FROM users_table WHERE email='$email'"); if (mysqli_num_rows($result) != 0) { - $_SESSION["info_signup"] = "Email address " . $email . " is already in use."; - $_SESSION['user_fullname'] = null; - header("Location: signup.php"); - return; + $_SESSION["info_signup"] = "Email address " . $email . " is already in use. You have already signed up?"; } $_SESSION['user_fullname'] = $_POST["fullname"]; @@ -161,11 +158,9 @@ if (!empty($_POST["form_signup"])) { // check if email is taken $result = mysqli_query($con, "SELECT * FROM users_table WHERE email='$email'"); - if (mysqli_num_rows($result) != 0) { - $_SESSION["info_signup"] = "Email address " . $email . " is already in use."; - $_SESSION['user_fullname'] = null; - header("Location: signup.php"); - return; + if(mysqli_num_rows($result) != 0) + { + $_SESSION["info_signup"]="Email address ".$email." is already in use. Do you have an old LRR account?"; }