diff --git a/Script.php b/Script.php index 5a84f98..968faae 100644 --- a/Script.php +++ b/Script.php @@ -123,10 +123,9 @@ if (!empty($_POST["frm_signup_1"])) { return; } //applying password_hash() - $sha512=hash('sha512', $password); $password_hash = password_hash($password, PASSWORD_DEFAULT); - $sql= "INSERT INTO `users_table`(`Email`, `Password`, `HashPassword`, `Full_Name`, `UserType`, `Student_ID`, `Passport_Number`) VALUES " - . "('$email','$password_hash','$sha512','$fullname','Student','$student_id','$passport')"; + $sql= "INSERT INTO `users_table`(`Email`, `Password`, `Full_Name`, `UserType`, `Student_ID`, `Passport_Number`) VALUES " + . "('$email','$password_hash','$fullname','Student','$student_id','$passport')"; if ($con->query($sql) === TRUE) { header("Location: Courses.php"); diff --git a/lrr (1).sql b/lrr (1).sql index c8b3fc8..f11c54f 100644 --- a/lrr (1).sql +++ b/lrr (1).sql @@ -187,7 +187,7 @@ CREATE TABLE `students_data` ( CREATE TABLE `users_table` ( `User_ID` int(11) NOT NULL, `Email` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL, - `Password` varchar(50) CHARACTER SET utf8 DEFAULT NULL, + `Password` varchar(250) CHARACTER SET utf8 DEFAULT NULL, `Full_Name` varchar(50) CHARACTER SET utf8 DEFAULT NULL, `UserType` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL, `Student_ID` varchar(500) COLLATE utf8mb4_bin DEFAULT NULL, diff --git a/lrr_datbase.sql b/lrr_datbase.sql index d31c47a..f51d681 100644 --- a/lrr_datbase.sql +++ b/lrr_datbase.sql @@ -249,7 +249,7 @@ INSERT INTO `students_data` (`ID`, `Student_ID`, `Passport_Number`) VALUES CREATE TABLE `users_table` ( `User_ID` int(11) NOT NULL, `Email` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL, - `Password` varchar(50) CHARACTER SET utf8 DEFAULT NULL, + `Password` varchar(250) CHARACTER SET utf8 DEFAULT NULL, `Full_Name` varchar(50) CHARACTER SET utf8 DEFAULT NULL, `UserType` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL, `Student_ID` varchar(500) COLLATE utf8mb4_bin DEFAULT NULL,