All Session variables were deleted and the session destroyed
Make a new session and set session variables
Return to the last page with no session variables set
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<body>
<?php
// remove all session variables
session_unset();
// destroy the session
session_destroy();
//delete the session cookie by setting expiration date in the past
setcookie(session_name(), "", time() - 3600);
?>
<h3>All Session variables were deleted and the session destroyed</h3>
<a href="session_example_1.php">Make a new session and set session variables</a><br>
<a href="session_example_2.php">Return to the last page with no session variables set</a><br>
<br>
<div style="background-color:#D3D3D3;">
<?php highlight_file("session_example_delete.php"); //outputs the source code of this file to the web page ?>
</div>
</body>
</html>