Results 1 to 2 of 2
Thread: Cookie's Life
Aug 28, 2002, 06:48 #1
I set a cookie and then I deleted that cookie manualy from the cookies folder in my windows.
But although I deleted that cookie file from my windows, if I execute this code it'll give me the cookie contents:
$CkUserName = $HTTP_COOKIE_VARS["CkUserName"];
echo "The content of the cookie is: $CkUseName":
This is if I deleted the cookie file with colsing the session, it'll gave me the cookie content, even if I hit the Refresh button million times.
And if I set the cookie with a php script to null, it will not see the cookie:
This if I didn't close the session.
But if I closed the session and run the first script again, it will not see the cookie!
So is the cookie available for the session until its closed if deleted the cookis file manulay?
Anything wrong with my knowledge? Anyone can help?HaVe a GooD DaY
Aug 28, 2002, 08:20 #2
- Join Date
- May 2001
- San Diego, CA
- 0 Post(s)
- 0 Thread(s)
Cookies are good for the browser's session, unless its time span is set. A cookie set to expire in 20 minutes will expire in 20 minutes. This is why the easist way to kill a cookie is to set its expire date to a date that has already pasted. This will caused the cookie to disappear.