Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookie's Life

Status
Not open for further replies.

alsaffar

Programmer
Oct 25, 2001
165
KW
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[&quot;CkUserName&quot;];

echo &quot;The content of the cookie is: $CkUseName&quot;:

?>

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 (&quot;CkUserName&quot;,&quot;&quot;,&quot;&quot;,&quot;/&quot;,&quot;.myDomain.com&quot;,&quot;&quot;);
?>

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?
 
I was talking to our php guru (i am just learning php myself) and he was telling me that if you try a 'Shift' Refresh you should notice a difference. Refresh looks for a change in the date of the page and if it doesn't find one it doesn't reload the page where 'Shift' refresh will reload the page.

HTH
Binky ::)
><>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top