23.02.2018, 10:19
PHP код:
$hashedpw = hash('sha256', $_SESSION['user-password']); //+ what ever your salt is
//compare hashedpw to the one in the database
//may not be valid code
$getuserpw = $connection->prepare('SELECT `password` FROM `users` WHERE `username` = "$user-name");
if (password_verify($getuserpw , $hashedpw)) //or $row['password'] i don't know
{
//do whatever
}
else
{
//do whatever
}
https://stackoverflow.com/questions/...sunderstanding
http://php.net/manual/en/function.password-verify.php