Answers for "how to verify password in php"

PHP
0

how to check confirm password in php

if ($_POST["password"] === $_POST["confirm_password"]) {
   // success!
}
else {
   // failed :(
}
Posted by: Guest on January-11-2021
-2

password_verify php

<?php
$hash = password_hash('rasmuslerdorf');
// the password_hash function will encrypt the password into a 60 character string
if (password_verify('rasmuslerdorf', $hash)) {
    echo 'Password is valid!';
} else {
    echo 'Invalid password.';
}
?>
// the only to decrypt is by using the password_verify() function
Posted by: Guest on February-20-2020

Browse Popular Code Answers by Language