I'm creating a website with SESSION and I'm trying to make the index be viewed only by users, but even I'm login or logout my script still redirecting.
I created:
<?php
if($_SESSION['id'] == true){
break;
} else {
header('Location:nologin.php');
}
?>
But when I do login, script still redirecting to nologin.php and I changed to:
<?php
if($_SESSION['id'] == false){
header('Location:nologin.php');
}
?>
And the problem still occurs, How do I do?
Aucun commentaire:
Enregistrer un commentaire