From 2255a1a9ebc34b4be9b053241f228a453cc24780 Mon Sep 17 00:00:00 2001 From: Lan Hui Date: Tue, 12 Dec 2023 19:21:24 +0800 Subject: [PATCH] Script.php: not Users_Table, but users_table -- every letter in the table name should be in lowercase --- Script.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Script.php b/Script.php index cb0ffca..32c3ffb 100644 --- a/Script.php +++ b/Script.php @@ -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) { - $password = generateStrongPassword(); - - } - + $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 "