In PHP, How to Delete a Cookie?

Deleting a cookie you should assure that the expiration date is in the past.

example:

<?php
// set the expiration date to one hour ago
setcookie("user", "", time()-3600);
?>

No comments:

Post a Comment