|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Cookie's Life
Hi there,
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: <? setcookie ("CkUserName","","","/",".myDomain.com",""); ?> 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? |
|
#2
|
|||
|
|||
|
RE: Cookie's Life
what u are doing with that setcookie() call is setting a "memory-only" cookie, that is not savet to disk, but remains in memory while the browser is active.
to test it, close your browser, and start it again, and navigate to the same page. to use "disk" cookies, try setting a life-time for cookie, like this: this is from the php man at page http://php.net/setcookie . in the future, i sugest to RTFM |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Cookie's Life |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|