wwedude Posted November 1, 2008 Share Posted November 1, 2008 I just installed a user system, and I am trying to make a code that will check if you are logged in, and if you aren't you will be redirected to the login page. <?php if(isset($_COOKIE['cookname']) && isset($_COOKIE['cookid'])){ echo ""; } else { header("Location: /go/membership/"); } ?> But the problem, even after I log in, and the system sets the cookie, and I access this code, it will redirect me to the login page, where it says I am already logged in. The cookies are written right there, so what's the problem? Thanks! Link to comment https://forums.phpfreaks.com/topic/131021-cookies-problem/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.