0% found this document useful (0 votes)
43 views1 page

Logout

This PHP script destroys the current user's session by unsetting all session variables, destroying the active session, and redirecting the user to the login page, requiring them to log in again to access the site.

Uploaded by

damner
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views1 page

Logout

This PHP script destroys the current user's session by unsetting all session variables, destroying the active session, and redirecting the user to the login page, requiring them to log in again to access the site.

Uploaded by

damner
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

<?

php
// Initialize the session
session_start();

// Unset all of the session variables


$_SESSION = array();

// Destroy the session.


session_destroy();

// Redirect to login page


header("location: login.php");
exit;
?>

You might also like