creating a passwording using password_hash()
is easy, how to reset this password probably is still not a clear process.
Is there a way to reset the password that is hashed, or is there another proper way of doing it?
creating password:
$password = $_POST['password'];
$hash_password = password_hash($password, PASSWORD_DEFAULT);
$sql=("INSERT INTO .....
resetting password:
$new_password = $_POST['new_password'];
$hash_new_password = password_hash($new_password, PASSWORD_DEFAULT);
$sql=("UPDATE .....
I believe there is something missing . . . Please advice
Thank you for your help. Here is the updated code:
$pass = $_POST['password'];
$password = password_hash($pass, PASSWORD_DEFAULT);