<?php
session_start();
include_once 'Connection.php';
date_default_timezone_set('Asia/Kolkata');
$Logout_time =  date('Y-m-d h:i:s');
$sql=" UPDATE login_logout SET logout_time = '$Logout_time' WHERE name = '$_SESSION[name]' and ifnull(logout_time,'') = ''";
$query = mysqli_query($con,$sql) or die(mysqli_error($con));
$_SESSION=NULL;
$_SESSION = [];
session_unset();
session_destroy();
   header("Location:index.php");


?>
