forked from mrlan/LRR
Update Script.php
passwords are now encripted by password hashing. This improves privacy on user data.ProjectHomePage
parent
2ac128c680
commit
2b03c8118d
|
@ -113,7 +113,7 @@ if (!empty($_POST["frm_signup_1"])) {
|
||||||
header("Location: signup.php");
|
header("Location: signup.php");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// check if email is taked
|
// check if email is taken
|
||||||
$result = mysqli_query($con,
|
$result = mysqli_query($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)
|
||||||
|
@ -122,7 +122,7 @@ if (!empty($_POST["frm_signup_1"])) {
|
||||||
header("Location: signup.php");
|
header("Location: signup.php");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//applying password_hash()
|
//applying password_hash() (first_commit)
|
||||||
$password_hash = password_hash($password, PASSWORD_DEFAULT);
|
$password_hash = password_hash($password, PASSWORD_DEFAULT);
|
||||||
$sql= "INSERT INTO `users_table`(`Email`, `Password`, `Full_Name`, `UserType`, `Student_ID`, `Passport_Number`) VALUES "
|
$sql= "INSERT INTO `users_table`(`Email`, `Password`, `Full_Name`, `UserType`, `Student_ID`, `Passport_Number`) VALUES "
|
||||||
. "('$email','$password_hash','$fullname','Student','$student_id','$passport')";
|
. "('$email','$password_hash','$fullname','Student','$student_id','$passport')";
|
||||||
|
|
Loading…
Reference in New Issue