When I search for "php proper login", all I find is how to properly hash a password. However, I remember reading that the following code is wrong because you can just add ?loggedIn=True to the URL. So what is the proper way to do this?
if($hash == $hashFromDatabase){
$loggedIn = True;
}
Then change the page accordingly to the value of $loggedIn.