|
Posted by Justin Koivisto on 05/16/05 17:18
petermichaux@yahoo.com wrote:
> Thanks for the reply. I thought that using sessions would probably be a
> better solution. The only thing is I won't know how many pages they
> have visited so i would have to either make a big array and hope it
> does not overflow or I have to make a last in first out stack. but then
> I'm worried if they use the back button I will not know where they are.
> Any references or links on how to do this?
>
> Peter
>
At each page, you could do something like:
$_SESSION['trail'][]=$_GET['ProductID'];
When they hit the back button, I believe that some browsers will
actually add another entry into the array, so you might have something like:
.... 13, 45, 13 ...
Indicating that the user was on page 13, then clicked to 45, then hit
the back button. Watch out though, many people like to open multiple
windows (or tabs) when browsing, so that will give you some pretty awful
results.
--
Justin Koivisto - justin@koivi.com
http://koivi.com
[Back to original message]
|