Script.php: not Users_Table, but users_table -- every letter in the table name should be in lowercase
parent
2b0574fd6d
commit
2255a1a9eb
13
Script.php
13
Script.php
|
@ -293,25 +293,22 @@ if (!empty($_POST["form_createlecturrer"])){
|
||||||
$fullname = mysqli_real_escape_string($con, $_POST["fullname"]);
|
$fullname = mysqli_real_escape_string($con, $_POST["fullname"]);
|
||||||
$type = mysqli_real_escape_string($con, $_POST["type"]);
|
$type = mysqli_real_escape_string($con, $_POST["type"]);
|
||||||
$password = mysqli_real_escape_string($con, $_POST["password"]);
|
$password = mysqli_real_escape_string($con, $_POST["password"]);
|
||||||
$pass_len=strlen($password);
|
$pass_len = strlen($password);
|
||||||
if ($pass_len==0) {
|
if ($pass_len == 0) {
|
||||||
$password = generateStrongPassword();
|
$password = generateStrongPassword();
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// $passport_no=$password;
|
// $passport_no=$password;
|
||||||
// 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 address : " . $email . " is already in use.";
|
||||||
header("Location: Admin.php");
|
header("Location: Admin.php");
|
||||||
exit;
|
exit;
|
||||||
// header( "refresh:5;url=Admin.php" );
|
// header( "refresh:5;url=Admin.php" );
|
||||||
|
|
||||||
}
|
}
|
||||||
$password_hash = password_hash("$password", PASSWORD_DEFAULT);
|
$password_hash = password_hash("$password", PASSWORD_DEFAULT);
|
||||||
$sql = "INSERT INTO `users_table`(`Email`, `Password`, `Full_Name`, `UserType`) VALUES "
|
$sql = "INSERT INTO `users_table`(`Email`, `Password`, `Full_Name`, `UserType`) VALUES "
|
||||||
|
|
Loading…
Reference in New Issue