<?php
//signout.php
include 'connect.php';
include 'header.php';

echo '<h2>Sign out</h2>';

//check if user if signed in
if($_SESSION['signedIn'] == true)
{
	//unset all variables
	$_SESSION['signedIn'] = NULL;
	$_SESSION['userName'] = NULL;
	$_SESSION['userNo']   = NULL;

	echo 'Succesfully signed out, thank you for visiting ';
	echo "<a href='../index.html'>Ink's Things</a>.";
}
else
{
	echo 'You are not signed in. Would you <a href="signin.php">like to</a>?';
}
include 'footer.php';
?>

