This repository has been archived on 2025-12-28. You can view files and clone it, but cannot push or open issues or pull requests.
inkletblot-com-v1/php forum/signout.php
2019-12-02 12:10:45 +10:30

26 lines
496 B
PHP

<?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';
?>