<?php
session_start();
include("connect.php");

$logtime = time();
mysql_query("UPDATE `admin` SET `last_logout` = '$logtime', `login_status` = '0' WHERE `admin`.`admin_id` = '$_SESSION[admin_id]'");

unset($_SESSION['admin_id']);

header('Location:../index.php');
exit;
?>