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);
?>
// set the expiration date to one hour ago
setcookie("user", "", time()-3600);
?>
No comments:
Post a Comment