PHP Cookie login help?
Thus i’m endeavoring to use cookies to find out if the user is logged throughout, and Concerning this code for the top of every page:
<php
session_start();
if(! isset($_COOKIE”check_login”))
header(“Location:/admin/login.php”);
>
it’s odd though because next time i go to the page by way of a website link, it redirects me for the login page no matter if the cookie is determined.when I key in the url of the page physically, it brings up the particular page with out redirecting us.I concept of what is going on, please assistance.Thanks!
BTW Concerning the 100 % url within the header and location component in my own code, but when i didn’t comprise it here which means you peeps are unable to creep at my login page lol.the matter is not considering the header, thus disregard this please.thanks!
Are anyone sure the particular name with the cookie is definitely check_login.
Leave a Reply
You must be logged in to post a comment.