Verifying Passwords in PHP


Verify user-submitted passwords against a hash stored in your database.

Source Code

if (password_verify('userPassword', $hashedPassword)) {
    echo "Password is correct!";
} else {
    echo "Invalid password!";
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments