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
You should verify you started the session in login.php.
Put session_start(); in all the pages
session_start();