I am using this to hash passwords: https://github.com/ircmaxell/password_compat
$hash = password_hash($pass1, PASSWORD_BCRYPT, array("cost" => 16));
if (password_verify($password, $hash)) {
/* Valid */
} else {
/* Invalid */
}
It works. It hashed passwords. But I dont know how to verify the password in the login page. I have tried with seesions but it doesnt work with sessions too.