Hi,
I have a line of code in my program as follows:
$username = $HTTP_COOKIE_VARS["myusername"];
From time to time, it fails to return a value.
Can anyone tell me how I can avoid this?
I tried to change the code as follows but still the same:
$username = $_COOKIE["myusername"];
Your help will be greatly appreciated.
$HTTP_COOKIE_VARS question
Moderator: General Moderators
Are you storing the cookie using setcookie() function ?
-
surfinglight
- Forum Newbie
- Posts: 9
- Joined: Wed May 04, 2005 10:04 pm
RE: Are you storing cookies...
Yes.
I am storing it as follows:
setcookie ("username", $username,time()+999999);
I am storing it as follows:
setcookie ("username", $username,time()+999999);