I've tried this so far:
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$type = $row['rights'];
if(check_login_status() == false && $type == "user")
{
header("error.php");
}
If the entry in the column "rights" for the specific user is "user" and if there is no one logged in then it must redirect to error.php. So far this doesn't work. It still shows the page if i'm logged in with a user account. Hopefully I'm specific enough.
Aucun commentaire:
Enregistrer un commentaire