relax99 has asked for the wisdom of the Perl Monks concerning the following question:
I've looked everywhere for an answer, but I can't seem to find a description of a nice way to do this.
I'm writing a perl / cgi script that has a number of views. Let's say you can move through web pages in the following sequence:
View 1 -> View 2 -> View 3 (password-protected)
View 3 is password-protected. If you're not logged in when you request it, the script redirects you to the login screen. So basically your path looks like this:
View 1 -> View 2 -> Login -> View 3
Now, how do you come back from View 3 to View 1. Would I store this sequence in a hidden variable and update it for each view? It's easy to remember just the last view, but it doesn't work beyond 2 screens. If I'm in View 3, I remember that the last view was View 2, but I don't know what comes before View 1.
Does anyone know of a nice and clean way to program this? Any examples of code? The code I've got is a mess - I would hate to maintain it, so I need to find a cleaner solution.
Thank you,
Alex
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Storing sequence of cgi states
by charnos (Friar) on Oct 08, 2002 at 14:57 UTC | |
|
Re: Storing sequence of cgi states
by fireartist (Chaplain) on Oct 08, 2002 at 16:39 UTC | |
|
Re: Storing sequence of cgi states
by khudgins (Sexton) on Oct 08, 2002 at 18:30 UTC | |
|
Re: Storing sequence of cgi states
by relax99 (Monk) on Oct 08, 2002 at 14:59 UTC | |
by rdfield (Priest) on Oct 08, 2002 at 15:14 UTC | |
by relax99 (Monk) on Oct 08, 2002 at 19:08 UTC | |
by rdfield (Priest) on Oct 08, 2002 at 19:18 UTC |