php - How to verify an hashed password -
i using password_hash()
function.
now works hash password, how verify it?
hope can me!
well function option called: password_verify
.
how work this;
<?php $password = "[pass]"; //password user fill in. $hash= "[hash]"; //the hashed password saved. $checkpass = password_verify($password, $hash); //this returns boolean; true or false if ($checkpass == true) { echo 'password good!'; } else { echo 'password wrong!'; } ?>
Comments
Post a Comment