Compare commits
No commits in common. "65920bc0acdd9f9ecb7b3fb82ee92895b07ec75e" and "162b3471190e762fdb7f7393478fb2331f3dff4f" have entirely different histories.
65920bc0ac
...
162b347119
|
@ -494,10 +494,6 @@ include 'Header.php';
|
||||||
echo '<hr><span class="alert alert-success" role="alert">' . $_SESSION['info_Courses_student'] . '</span>';
|
echo '<hr><span class="alert alert-success" role="alert">' . $_SESSION['info_Courses_student'] . '</span>';
|
||||||
$_SESSION['info_Courses_student'] = null;
|
$_SESSION['info_Courses_student'] = null;
|
||||||
}
|
}
|
||||||
if (isset($_SESSION['info_signup'])) {
|
|
||||||
echo '<hr><div class="alert alert-danger" role="alert">' . $_SESSION['info_signup'] . '</div>';
|
|
||||||
$_SESSION['info_signup'] = null;
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<br><br>
|
<br><br>
|
||||||
</div>
|
</div>
|
||||||
|
|
13
Script.php
13
Script.php
|
@ -70,7 +70,10 @@ if (!empty($_POST["form_signup"])) {
|
||||||
// check if email is taken
|
// check if email is taken
|
||||||
$result = mysqli_query($con, "SELECT * FROM users_table WHERE email='$email'");
|
$result = mysqli_query($con, "SELECT * FROM users_table WHERE email='$email'");
|
||||||
if (mysqli_num_rows($result) != 0) {
|
if (mysqli_num_rows($result) != 0) {
|
||||||
$_SESSION["info_signup"] = "Email address " . $email . " is already in use. You have already signed up?";
|
$_SESSION["info_signup"] = "Email address " . $email . " is already in use.";
|
||||||
|
$_SESSION['user_fullname'] = null;
|
||||||
|
header("Location: signup.php");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$_SESSION['user_fullname'] = $_POST["fullname"];
|
$_SESSION['user_fullname'] = $_POST["fullname"];
|
||||||
|
@ -158,9 +161,11 @@ if (!empty($_POST["form_signup"])) {
|
||||||
|
|
||||||
// check if email is taken
|
// check if email is taken
|
||||||
$result = mysqli_query($con, "SELECT * FROM users_table WHERE email='$email'");
|
$result = mysqli_query($con, "SELECT * FROM users_table WHERE email='$email'");
|
||||||
if(mysqli_num_rows($result) != 0)
|
if (mysqli_num_rows($result) != 0) {
|
||||||
{
|
$_SESSION["info_signup"] = "Email address " . $email . " is already in use.";
|
||||||
$_SESSION["info_signup"]="Email address ".$email." is already in use. Do you have an old LRR account?";
|
$_SESSION['user_fullname'] = null;
|
||||||
|
header("Location: signup.php");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue