$cookielogin = $HTTP_COOKIE_VARS[logged];
if(!isset($cookielogin))
{ header("location: ../login.php3"); }
else
{ echo "$cookielogin"; }
I have spent so much time on this thing, and still can't figure it out.
The above code defaults to true, no matter what.
I use it to test if a user is logged in already, if not, he's sent to the login page.
The login info is stored in a cookie called "logged".
The code sends the user to the login page, whether or not the cookie is set.
Any help? Thanks.
Richie.