Thursday, 26 December 2013

How to Delete a Cookie

How to Delete a Cookie?

When deleting a cookie you should assure that the expiration date is in the past.
Delete example:
<?php
// set the expiration date to one hour ago
setcookie("user", "", time()-3600);
?>

No comments:

Post a Comment