I’m trying set up a web site so that every new visitor has to enter from the home page only, for this example I have used just 3 pages.
session_start(); at the top of each page.
The home page has a form at the bottom to enter the site, just a button no text its not a login page.
The next page is a contents list with a normal menu to each page.
I have used an
include_once 'access.inc.php'; file in this page and the next page which is a list of products both are the same style.
The include file is
/* view home page first */
header( ‘Location: http://www.plasticfolders.co.uk’ );
I have included the print session id just to prove a session is created.
If I try to load a page other than the home page the redirect works ok, I can enter the site from the home page.
The contents page loads but when I try to load the products page from the menu provided I’m sent back to home to start again.
I think I need test the session state before a new page loads.
Many thanks for any help or advice.