in reply to interactive CGI script?
What I do is have a "mode" for each stage.
The mode would be undef on first loading the page. Submitting the form would include a hidden field or whatever that said "mode is now 'secondstage'" and so on.
So the code ends up being two or three large blocks like this:
if($mode eq ''){ # stuff that happens on the first page } if($mode eq 'secondstage'){ # stuff that happens after the upload } if($mode eq 'finalstage'){ # stuff that happens after their secondstage input } if($mode eq 'finished'){ print "Thanks, we're done."; }
Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.
M-J D
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: interactive CGI script?
by iguanodon (Priest) on Mar 05, 2003 at 11:43 UTC | |
by vinforget (Beadle) on Mar 05, 2003 at 14:41 UTC | |
|
Re^2: interactive CGI script?
by Coruscate (Sexton) on Mar 06, 2003 at 04:38 UTC | |
by vinforget (Beadle) on Mar 10, 2003 at 18:14 UTC |