the script that you send, it works on my system, the only error i am getting in include php name file, as the name is not correct, the actual name is include_once('userloggedincheckScript.php'); and the filename mentioned: include_once('userloggedincheck.php');
when i execute the first file landingScript.php, it automatically redirects as the path given in userloggedincheckScript.php file within header function.
i just only declare the value of session as i am not getting from the main file.
$_SESSION['Username'] = "a";
if ($_SESSION['Username'] != "")