Script.php: not Users_Table, but users_table -- every letter in the table name should be in lowercase

pull/59/head
Lan Hui 2023-12-12 19:21:24 +08:00
parent 2b0574fd6d
commit 2255a1a9eb
1 changed files with 5 additions and 8 deletions

View File

@ -293,25 +293,22 @@ if (!empty($_POST["form_createlecturrer"])){
$fullname = mysqli_real_escape_string($con, $_POST["fullname"]);
$type = mysqli_real_escape_string($con, $_POST["type"]);
$password = mysqli_real_escape_string($con, $_POST["password"]);
$pass_len=strlen($password);
if ($pass_len==0) {
$pass_len = strlen($password);
if ($pass_len == 0) {
$password = generateStrongPassword();
}
// $passport_no=$password;
// check if email is taken
$result = mysqli_query(
$con,
"SELECT * FROM Users_Table WHERE email='$email'"
"SELECT * FROM users_table WHERE email='$email'"
);
if (mysqli_num_rows($result) != 0) {
$_SESSION["info_Admin_Users"] = "Email address : " . $email . " is already in use.";
header("Location: Admin.php");
exit;
// header( "refresh:5;url=Admin.php" );
}
$password_hash = password_hash("$password", PASSWORD_DEFAULT);
$sql = "INSERT INTO `users_table`(`Email`, `Password`, `Full_Name`, `UserType`) VALUES "