I thought I had figured out a solution which was to use SESSIONS. What I did was to put this code at the top of my index.php page:
<?php
session_start();
$_SESSION['forward'] = "OK";
?>
Then at the top of each of my other pages I put the following:
<?php
session_start();
if(!isset($_SESSION['forward'])) {
header('Location:index.php);
}
?>
Although this does seem to work, what is happening is that my users end up having to login twice if they initially by-pass the index.php page. It seems the redirect is causing this.
I'm still uncertain as to a solution. I can easily move the counter and login report scripts someplace other than in the index.php file, but then don't know how to trigger them regardless of which page the user might login to first. I wouldn't want the trigger to go off everytime they moved from one page to another.