<?php
session_start();
include('includes/config.php');
date_default_timezone_set('Asia/Kolkata');
$updatetime = date('Y-m-d H:i:s');
if (isset($_SESSION['staffprimaryID'])) {
    $sql = "UPDATE tblstafflogs SET logoutTime = :updatetime WHERE id = :primaryID";
    $query = $dbh->prepare($sql);
    $query->bindParam(':primaryID', $_SESSION['staffprimaryID'], PDO::PARAM_INT);
    $query->bindParam(':updatetime', $updatetime);
    $query->execute();
}
?>