I am making a simple sign up and log in page and I am stuck as i am opening index.php it opens the page which should be loaded after the person has logged in. I am using cookie to keep the user logged in.
i am using the following code so that it does not happen but it continues to happen:
if( (array_key_exists("id", $_SESSION) AND $_SESSION['id']) OR (array_key_exists("id", $_COOKIE) AND $_COOKIE['id']) ){ header("Location: loggedIn.php"); }
Id is my primary key. I am not seeing any errors just that the index page does not load.
Aucun commentaire:
Enregistrer un commentaire