<?php 
require_once "user.php";
include "nik.php";
include "koneksi.php";

date_default_timezone_set('Asia/Jakarta');
$waktu = date('Y-m-d  H:i:s');
$query = "UPDATE user SET End_Activity = '$waktu' WHERE Nik = '$nik'";
mysqli_query($koneksi, $query)
or die ("Gagal Perintah SQL".mysql_error());

unset($_SESSION['warehouse']);

header('Location:login.php');

 ?>