I want to make sure that the user comes though the proper path.
So if the user hits page2 or page3 without having been to index then I want to send them back to page1.
What is the best way to do this?
I want to make sure that the user comes though the proper path.
So if the user hits page2 or page3 without having been to index then I want to send them back to page1.
What is the best way to do this?
I'd say with the sessions.
In index, start with:
<?php
session_start();
$_SESSION['index_visited'] = 1;
?>
Then in the other pages:
<?php
session_start();
if ( !isset($_SESSION['index_visited']) )
header('Location: index.php');
?>