I am trying to keep track of each page in a history so that the user can go back as many as 5 steps into their history.
I was planning on doing this using a class object:
(please ignore any previous defines like TRUE and NULL)
I need to keep track of at least those 3 variables. What I wanted to do was to create a linked list of these objects, and then store them in a session cookie if possible.
Is this the hard way of doing it?
Any suggestions? Is it possible to create a linked list of objects in PHP?
If so, is it possible to maintain the list through multiple requests via cookies or sessions?
- "Delightfully confusing..." raves The New York Times
-kas
I was planning on doing this using a class object:
(please ignore any previous defines like TRUE and NULL)
Code:
class HistoryObj {
var $label;
var $filename;
var $active;
function HistoryObj() {
$this->label = NULL;
$this->filename = NULL;
$this->active = FALSE;
}
}
I need to keep track of at least those 3 variables. What I wanted to do was to create a linked list of these objects, and then store them in a session cookie if possible.
Is this the hard way of doing it?
Any suggestions? Is it possible to create a linked list of objects in PHP?
If so, is it possible to maintain the list through multiple requests via cookies or sessions?
- "Delightfully confusing..." raves The New York Times
-kas