<?php session_start(); $_SESSION = array(); session_unset(); session_destroy(); if(isset($_GET["expired"])) header("Location: index.php?expired=1"); else header("Location: index.php"); ?>