Cookies
Hello All,
I am trying to use cookies to get my application to recognize returning users. After logging in I want to set a cookie using the following line of code:
setcookie("username", $username, time() + 31536000);
But it doesn't seem to be working. I have tried to access the cookie using $_COOKIE['username'],and $HTTP_COOKIE_VARS['username'], and I always get a null value.
I have also tried:
if(isset($username))
and it always comes up negative.
Can anyone tell me what I am doing wrong?
Glen
|