HOME


sh-3ll 1.0
DIR:/chroot/home/laughingplants/laughingplants.com/html/admin/
Upload File :
Current File : /chroot/home/laughingplants/laughingplants.com/html/admin/logout.php
<?php session_start(); ob_start();
include 'config.php';
 
date_default_timezone_set("Asia/Kolkata");
$dt = date('Y-m-d H:i:s');

$update_last_login = $con->prepare("UPDATE tbl_admin SET last_login=:last_login  WHERE id= :id");
$update_last_login->bindParam(':last_login', $dt);
$update_last_login->bindParam(':id', $_SESSION['id']);
$update_last_login->execute();
unset($_SESSION["id"]);
unset($_SESSION["ad_email_address"]);
unset($_SESSION["session"]);
session_destroy();
header('Location: index.php', true);
echo "<meta http-equiv='refresh' content='0;url=index.php'>";
echo "<script>window.location='index.php';</script>";
exit(); 

?>