ob_start(); session_start(); if(!isset($_SESSION['name'])) { header("Location:login.php"); unset($_SESSION['name']); }