Script.php: fix typo 'adress'. #13
18
Script.php
18
Script.php
|
@ -106,8 +106,9 @@ if (!empty($_POST["frm_signup_2"])) {
|
||||||
|
|
||||||
// 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_signup2"] = "Email adress " . $email . " is already in use.";
|
{
|
||||||
|
$_SESSION["info_signup2"]="Email address ".$email." is already in use.";
|
||||||
$_SESSION['user_fullname'] = null;
|
$_SESSION['user_fullname'] = null;
|
||||||
header("Location: signup.php");
|
header("Location: signup.php");
|
||||||
return;
|
return;
|
||||||
|
@ -272,15 +273,14 @@ if (!empty($_POST["frm_createlecturrer"])) {
|
||||||
$type = mysqli_real_escape_string($con, $_POST["type"]);
|
$type = mysqli_real_escape_string($con, $_POST["type"]);
|
||||||
$password = $passport;
|
$password = $passport;
|
||||||
// check if email is taken
|
// check if email is taken
|
||||||
$result = mysqli_query(
|
$result = mysqli_query($con,
|
||||||
$con,
|
"SELECT * FROM Users_Table WHERE email='$email'");
|
||||||
"SELECT * FROM Users_Table WHERE email='$email'"
|
if(mysqli_num_rows($result)!=0)
|
||||||
);
|
{
|
||||||
if (mysqli_num_rows($result) != 0) {
|
$_SESSION["info_Admin_Users"]="Email address : ".$email." is already in use.";
|
||||||
$_SESSION["info_Admin_Users"] = "Email adress : " . $email . " is already in use.";
|
|
||||||
header("Location: Admin.php");
|
header("Location: Admin.php");
|
||||||
}
|
}
|
||||||
$sql = "INSERT INTO `users_table`(`Email`, `Password`, `Full_Name`, `UserType`) VALUES "
|
$sql= "INSERT INTO `users_table`(`Email`, `Password`, `Full_Name`, `UserType`) VALUES "
|
||||||
. "('$email','$password','$fullname','$type')";
|
. "('$email','$password','$fullname','$type')";
|
||||||
|
|
||||||
if ($con->query($sql) === TRUE) {
|
if ($con->query($sql) === TRUE) {
|
||||||
|
|
Loading…
Reference in New Issue