Merge pull request 'Fix bug 193 http://118.25.96.118/bugzilla/show_bug.cgi?id=193' (#35) from Bug193-Martha into Hui-Organize
Reviewed-on: #35Hui-Organize
commit
65920bc0ac
|
@ -494,6 +494,10 @@ include 'Header.php';
|
|||
echo '<hr><span class="alert alert-success" role="alert">' . $_SESSION['info_Courses_student'] . '</span>';
|
||||
$_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>
|
||||
</div>
|
||||
|
|
13
Script.php
13
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?";
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue