I'm designing a small site and I have this structure in mind:
index.php
---------------
login fields. User enters login info. LoginCheck.php is called.
LoginCheck.php
-----------------------
Login info are POST collected and checked in DB. If successful, session variables are set. Then redirected to index.php using header("location:index.php");
In index.php. I'm checking is the session variable is registered. But it looks like the session variable is lost during redirection using header.
Is there any workaround for this?