<?php
session_start();
session_unset();
session_destroy();

// Start a fresh session to store the one-time notice
session_start();
$_SESSION['logged_out'] = true;

header("Location: index.php");
exit;

