Answer the question
In order to leave comments, you need to log in
Why doesn't password_verify work?
$AuthUserData = [
'authEmail' => $_POST['authEmail'],
'authPass' => $_POST['authPass'],
'authCodeWord' => $_POST['authCodeWord']
];
$AuthUserEmail = $AuthUserData['authEmail'];
$authUserRequest = $DBC->query("SELECT * FROM `users` WHERE `email` = '$AuthUserEmail'");
$countAuthUser = $authUserRequest->rowCount();
$authUser = $authUserRequest->fetch();
if ($countAuthUser > 0 && password_verify($AuthUserData['authPass'], $authUser['passHash'])) {
echo 'Авторизация прошла успешно!';
$_SESSION = [
$authUser
];
} else {
echo 'Авторизация прошла хреново!';
}
$authUser['passHash']
$AuthUserData['authPass']
print_f()
password_verify
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question