Feb 7, 2006
Is there a system available to do the following:
View 3 Replies
consider an app of a few pages:
when I am at page3.php, I do not know whether I came there from
page1->form1 or page2->form3.
I can check for $_SERVER['HTTP_REFERER'] and get an answer. But this
example is simple. Let us generailze that I want an app that keeps a
track of all the pages the user requested, in the order that they were
sent to him.
Obviously, it can be written based on sessions. Is there already some
popular open source application for this?
Also, this brings me to a broader question of page navigation rules. In
an app made of 20-50 pages/scripts, life will be hell if there is no
systematic approach to transferring control between pages. Is there
some kind of structure already made and readily available into which
you just plug-in your pages by telling some rules ?
E.g. the scheme is something like:
$ListOfPages = array(
$RuleSet = array(
The RuleSet is a set of page transfer rules based on evaluation to true
of the specified functions, i.e., allow_edit(), allow_add(),
Obviously, form submission is the chief means of control transfer for
PHP programs and the use of ?op=add_something in URL's(GET) and <input
type=hidden name=op value=add_something> (POST) are a step towards
making some kind of structure.
So the grand code will look like:
$MyGrandAppControllerObj = new GrandAppControllerObj();