This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

PHP Sessions

Destroy a PHP Session

All session variables are now removed, and the session is destroyed.

<?php
// remove all session variables
session_unset();

// destroy the session
session_destroy();

// confirmation all session variables are removed and the session destroyed
echo "All session variables are now removed, and the session is destroyed."
?>