Home › Forums › Back End › Try out my first PHP web app! › Reply To: Try out my first PHP web app!
August 4, 2014 at 1:07 pm
#177587
__
Participant
Basically, yes. However:
- don’t use
select *
. Specify the fields you want explicitly. - don’t use a loop. There should only be one row in a successful result, so there is no need: it just complicates things.
select hash from users where username=?
// do your query . . .
// assuming you get a result, verify:
if( password_verify( $_POST['password'],$queryResult['hash'] ) ){
// valid
}else{
// invalid
}