Home › Forums › Back End › Need help with login form › Reply To: Need help with login form
June 8, 2015 at 4:10 am
#203410
cscodismith
Participant
UPDATE:
I have fixed the following error above with adding the following code into the password_verify function.
if (password_verify($password, $hash)){
$_SESSION['username'] = $_POST['username'];
header("Location: index.php");
} else {
echo 'password is invalid';
}
The code above correctly displays the username on the homepage when redirected.