How to make Cookies Expired
May 1st, 2007
The difference between cookie and session is cookie is saved in client ( browser) but session is saved in server.
If you want to unset cookies you can not use unset function.
This code wil show how to make cookie expired
If you want to set how cookie expire in time you can use something like this
<?
setcookie(“TestCookie”, $value, time()+3600);
?>
But because cookie can not be unset …
To unset cookie …
You can use code like this
<?
setcookie(“TestCookie”, $value, time()-3600);
?>
Where am I?
You’re currently at “How to make Cookies Expired,” an entry on Talk Only by admin on May 01 2007 @ 4:28 pm
-
Categories
-
Meta


Leave a Comment