Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks
i'm trying to make a multi page form using CGI.pm
and i'm facing a problem with switching to the thired step
#!/usr/bin/perl -w use strict; use CGI ":standard"; print header; my $action = param('action'); my $title = 'Simple Script'; if(not $action){ print start_html(-title=>$title); print '<a href="?action=add">Start</a>',end_html; }elsif($action eq "add"){ print start_html(-title=>$title.' Enter your name'); print start_form(-action=>"?action=addnew"), textfield('name','Enter Your name',20), submit('submit'),reset, end_form,end_html; }elsif($action eq "addnew"){ my $name = param('name'); if(not $name){ print p('Error , You should write your name'); }else{ print p("Welcome $name"); } }
by the way it's my first time using CGI.pm i was using the old way of reading from STDIN
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Multi page form
by Purdy (Hermit) on Sep 28, 2005 at 14:16 UTC | |
by Anonymous Monk on Sep 28, 2005 at 15:09 UTC | |
by Purdy (Hermit) on Sep 28, 2005 at 15:21 UTC | |
|
Re: Multi page form
by kwaping (Priest) on Sep 28, 2005 at 14:37 UTC | |
|
Re: Multi page form
by eric256 (Parson) on Sep 28, 2005 at 15:35 UTC |