How it should work: Index.php is the secured page. It includes check.php, which checks if you have a session = good. If it hasn\'t, you\'re not logged in -> log off, remove sess
First check on the pages you want to use session variables session is start or not and if session is not stat then start it.
and this is the very first line in the php file.
Code for the session checking is :
if(!session_id()) { session_start(); }