All pastes #250663 Raw Edit

logout.php

public text v1 · immutable
#250663 ·published 2006-11-17 04:34 UTC
rendered paste body
<?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();

}
}
?>