Hi all this is my index page it works fine but the only porblem is that when user close the tab without
logging out then login.php page displayed with menu obove.i want to expire the session if user close the tab
help me out please
<?php
session_start();
if(!isset($_SESSION['_LOGIN']))
{
$_SESSION['_LOGIN'] = 0;
}
include 'inc/db.php';
$page = isset($_GET['page']) ? trim ($_GET['page']):NULL;
include 'inc/shtml.php';
include 'inc/header.php';
include 'inc/nav.php';
if (($page != NULL) && ($_SESSION['_LOGIN'] == 1))
{
include "inc/c_".$page.".php";
}
else
{
include 'inc/login.php';
}
include 'inc/footer.php';
?>