Page is not redirecting to the login screen when session value not set. I have echo the value and checked. Session value not exists, even then page not redirecting following is my code.
if(!isset($_SESSION['user']))
{
header("Location: index.php");
}