Here's how I arranged it (loosely):
"track.php" =======
<?php
if (!$id) { # only if $id is null/not init
session_register('id'); # init $id
session_start(); # start session
$id=session_id(); # apply value
}
?>
"page1.html" (and all other pages) =======
....
<head><?include ("track.php")?>...
<body>...
<a href="page2.html?id=<?echo $id?>">link</a>
(No problem parsing .html files with php)
I am now looking to make sure that every single link, whether on the page, in a form, or coming from a script result has the php code appended to it.
I am also meticulously going through every page to be sure that there are no absolute paths in any of the links that need php.
I need to carry the session_id in the URL like this so that the code gets written to the transfer.log, which is where we get our stats and visitor paths from.
I have this code on every page to (a) carry over the session_id throughout the visit, and (b) to get the session started regardless of where the visitor enters the site.
===
It is clear that php makes the connection between the URL argument (id=) and the php variable ($id). This indicates that php is reading and interpreting stuff with its engine.
Where can I find php information with detail about the engine itself, not just how to apply code? I don't want to hack it...just to better understand it.
Thanks, again!