Delete a cookie


SUBMITTED BY: henry1874w

DATE: June 21, 2017, 11:32 p.m.

FORMAT: Text only

SIZE: 193 Bytes

HITS: 204

  1. <!DOCTYPE html>
  2. <?php
  3. // set the expiration date to one hour ago
  4. setcookie("user", "", time() - 3600);
  5. ?>
  6. <html>
  7. <body>
  8. <?php
  9. echo "Cookie 'user' is deleted.";
  10. ?>
  11. </body>
  12. </html>

comments powered by Disqus