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 "