<?php session_start(); session_destroy(); $_SESSION = array(); header("location: login.php"); ?>
<?php ob_start(); if (!isset($_SESSION)) session_start(); unset($_SESSION['user_id']); session_destroy(); header("location:index.php");