For the hashing in PHP I wrote this, however it isn't working. When I go to the database on phpMyAdmin the password isn't hashed. I checked on some forums, but no solution. I did the test, and it worked on the browser when I type echo "smthg"; echo password_hash(...)
, but not in the database. I don't know the solution. Would really appreciate your help.
This is the command:
else {
$hashedpwd = password_hash ($password, PASSWORD_DEFAULT);
//INSERT THE USERT INTO THE DATABASE
$sql = "INSERT INTO users (last_name, first_name,email,username,pwd)
VALUES ('$Name', '$Prenom', '$username','$email', '$password');";
mysqli_query($conn,$sql);
header("Location: ../signup.php?signup=done");
exit();
}