Logging visitors path and presenting this to visitors
| From: | Peter Lauri | Date: | Sat, 18 Feb 2006 04:47:41 +0000 |
| Subject: | Logging visitors path and presenting this to visitors | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-230677@lists.php.net to get a copy of this message | ||
Hi,
I am about to create a feature that will help the visitor in his/her
navigation of the page. I want to store the visitors last 10 pages that was
visited so that this person easily can go back to a page he was at before,
without using the BACK button. I see two solutions to this, but I am not
sure on witch one to choose.
1. Create a session variable that contains the last 10 pages and update that
variable for every page he/she visits.
2. Have a database table that contains this information that is related to
the session ID.
I am concerned that 2 will take resources from the server, but I would use
an already created link to the database. So maybe the inserts and selects
are neglectable?
Number 2 can also be extended to an even better solution, when the user
comes back, the data can be recovered if we set a cookie for this.
However 1 is much easier to implement, but 2 can be extended to better
functionality.
Witch one would you choose?
/Peter