All About Computer And Life

Talk Only

Your Ad Here

How to make Cookies Expired

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);

?>

Your Ad Here

Leave a Comment

Home

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