Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Need help with login form Reply To: Need help with login form

#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.