+ 1

Trying to use password_verify

https://code.sololearn.com/wm8GVOXC94ra/?ref=app I'm trying to use password_verify, because on my registration page I use password_hash ($ password, PASSWORD_DEFAULT), but when trying to use password_verify it gives error, both when receiving the database password and identifying, I need to receive the password that the user I typed in the input and compared it to the one in the database, but I can not :( Somebody help me please

9th Mar 2019, 11:52 PM
TheReyzer TM
TheReyzer TM - avatar
7 Answers
+ 1
the problem is your SQL statement your are trying to select a user, in the database the password is hashed but the input password of the user not, password = 1234 password in database = dhskososnxj your SQL statement cannot have results because the password will never match a user
10th Mar 2019, 8:56 AM
Bernard Ng
Bernard Ng - avatar
10th Mar 2019, 9:04 AM
Bernard Ng
Bernard Ng - avatar
+ 1
check the line before may be you forgot to close a "( { or ;"
10th Mar 2019, 10:59 AM
Bernard Ng
Bernard Ng - avatar
0
Please help me :(
9th Mar 2019, 11:52 PM
TheReyzer TM
TheReyzer TM - avatar
0
Bro I get this error Parse error: syntax error, unexpected '$senha' (T_VARIABLE) in /storage/ssd4/809/8183809/public_html/login-user.php on line 18 Line 18 $senha = $_POST['senha'];
10th Mar 2019, 10:46 AM
TheReyzer TM
TheReyzer TM - avatar
0
Ok I go check
10th Mar 2019, 11:06 AM
TheReyzer TM
TheReyzer TM - avatar
0
on line 24 there was one; but even after putting still the same error :(
10th Mar 2019, 11:17 AM
TheReyzer TM
TheReyzer TM - avatar