#php login using bcryot

4 messages ยท Page 1 of 1 (latest)

steady urchin
bronze cedar
errant stone
#

You need to fetch the result and use the PHP function you can't do it inside the query.

$login = Config::$g_con->prepare('SELECT `id`, `password` FROM `users` WHERE `name` = ?');

if(password_verify($_POST['password'], $session->password)) {
    // Password Match
} else {
    // Password didn't match
}
bronze cedar
#

thanks you sm @errant stone it worked rep