<?php // Start the session session_start(); // Unset the authenticated session variable unset($_SESSION["authenticated"]); // Destroy the session session_destroy(); // Redirect the user back to the login page header("Location: index.php"); exit; ?>