logout.php
public text v1 · immutable<?php
session_start();
if($_SESSION['support_in'] == true) {
session_unset();
session_destroy();
header("Location: http://localhost/Test/index.php");
exit();
}
else{
if ($_SESSION['support_in']== false) {
//the session variable isn't registered, the user shouldn't even be on this page
header("Location: http://localhost/Test/index.php");
exit();
}
}
?>