qazxswcde has asked for the wisdom of the Perl Monks concerning the following question:
s_page(); if(param("option") == 'login') { l_page(); } else { r_page(); } foot();
problem is all 3 functions display forms and i want them to display one after the other not in the same page. So first i want to display a page showing only s_page then i want to display a page showing ethier l_page or r_page depending on what you input. how is this done. The page keeps reseting making a if statment difficult i have tried using a "lexicon value but it doesnt seem to be working. Keeps displaying the first screen over and over again.
#!/usr/bin/perl use strict; use warnings; BEGIN{my $donce = 0; sub incr{ $donce++;} sub getdo{return $donce}} use LWP::Simple; use CGI qw/:standard/; print "Content-type: text/html\n\n"; had(); #lets me know if user has selected a option yet if(getdo() == 0) {s_page(); incr();print getdo();} else { if(param("option") eq 'login') { l_page(); } else { r_page(); } } foot();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using the param function
by ikegami (Patriarch) on Aug 15, 2009 at 15:45 UTC | |
|
Re: Using the param function
by chromatic (Archbishop) on Aug 16, 2009 at 01:07 UTC | |
|
Re: Using the param function
by ikegami (Patriarch) on Aug 16, 2009 at 01:24 UTC | |
|
Re: Using the param function
by jethro (Monsignor) on Aug 15, 2009 at 22:09 UTC |