1
What would be the best practices for maneuvering the following PHP code?
if(!isset($_SESSION['email'], $_SESSION['senha'], $_SESSION['nivel'], $logado)){
header("location: index.php");
}
And it’s obvious that when I kill the session it loops into an infinite loop for the simple fact that it doesn’t exist. But, how do I stop it from looping?
When I run the code the following screen appears:
Whatever the code of index.php, it has the same if, if you have only take it solves ?
– user6026
Although you have already received several answers, missed to say something that to do it I need to know what would be the variable $logged
– Bruno Augusto
plus a var for when the email is checked it initializes it with the value 1 if the process has worked
– Luitame