hi all
i have this code which checks if a cookie has been set to "admin". If it has then the admin user can see the page, else access to the page is refused.
When someone logs out, the cookies are set to "" and time()-3600. This works fine when I operate my software on localhost.
When I put it onto the server though, the cookie does not seem to get cleared. It is as if it is being set somewhere else.
Is there something I have to do to the server?
Here is my code that does the reset,
==========================================
<?php
global $HTTP_GET_VARS;
$status = $HTTP_GET_VARS["status"];
echo "STATUS = $status<br>\n";
if($status=="logout")
{
setcookie("userCookie", "", time()-3600);
//$_COOKIE["userCookie"] = "";
echo "ZZZ";
echo $_COOKIE["userCookie"];
//$_COOKIE["usernameCookie"] = "";
}
?>
==========================================
HELP!!
p.s. The code above works fine on localhost but not on server... anyone got a clue?