If you want to destroy the variable in the $_SESSION use
- unset($_SESSION['var_name']);
If you want to destroy the entire session, use this code snippet from the PHP documentation
http://nl3.php.net/manual/nl/functio...on-destroy.php
[PHP]<?php
// Initialize the session.
// If you are using session_name("something"), don't forget it now!
session_start();
// Unset all of the session variables.
$_SESSION = array();
// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time()-42000, '/');
}
// Finally, destroy the session.
session_destroy();
?> [/PHP]
Ronald :cool: