The first problem with that code is you have missed a semicolon off the echo line:
PHP Code:
echo "You are not logged in.";
The second problem is, when using the SESSION array, it should always be in capital letters not lowercase as you have coded it.
Like this:
PHP Code:
<?php
session_start();
//Some code here
$_SESSION['User_Logged']="Yes";
?>
PHP Code:
<?php
session_start();
if($_SESSION['User_Logged']!="Yes")
{
echo "You are not logged in.";
exit();
}
//Some Actual Working HERE
?>
That's why you got 'undefined index' error because PHP thinks you have declared an ordinary array called $_session, which of course won't persist to your second page.