Destroy a session


SUBMITTED BY: henry1874w

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

FORMAT: Text only

SIZE: 272 Bytes

HITS: 267

  1. <?php
  2. session_start();
  3. ?>
  4. <!DOCTYPE html>
  5. <html>
  6. <body>
  7. <?php
  8. // remove all session variables
  9. session_unset();
  10. // destroy the session
  11. session_destroy();
  12. echo "All session variables are now removed, and the session is destroyed."
  13. ?>
  14. </body>
  15. </html>

comments powered by Disqus