<?php
	if(!isset($_SESSION)){
    	include("config.php");
    	session_start();
	}

	unset($_SESSION['is_logged_in']);
	unset($_SESSION['user_detail']);

	$_SESSION['is_logged_in'] = FALSE;
	session_destroy();
	$offline 	= "UPDATE users SET login_status='1' WHERE id='".$_SESSION['login_id']."'";
	$offline_rs = mysqli_query($conn,$offline);
	die('<script type="text/javascript">window.location.href="login.php"</script>');
?>