bigup401 has asked for the wisdom of the Perl Monks concerning the following question:
HELLO.PL<form method="post" action="hello.pl"> <td>firstname</td> <td><input type="text" name="firstname"></td> </tr><tr> <td>lastname</td> <td><input type="text" name="lastname"></td> </tr><tr> <td><input type="submit"></td> </table> </form>
WELCOME.PLuse CGI; use strict; $cgi = CGI->new(); my $fname = $cgi->param('firstname'); my $lname = $cgi->param('lastname'); print "Content-Type: text/html\n\n"; print <<HTML; <form method="post" action="welcome.pl"> <table width="100%"> <tbody><tr> <td><table cellpadding="5"> <tbody><tr> <td>Firstname</td> <td><b>$fname</b></td> </tr> <tr> <td>Lastname</td> <td><b>$lname</b></td> </tr> </form> HTML
use CGI; use strict; $cgi = CGI->new(); my $x = $cgi->param('$fname'); my $q = $cgi->param('$lname'); print "Content-Type: text/html\n\n"; print <<HTML; <form method="get" action="welcome.pl"> <table width="100%"> <tbody><tr> <td><table cellpadding="5"> <tbody><tr> <td>Firstname</td> <td><b>$x</b></td> </tr> <tr> <td>Lastname</td> <td><b>$q</b></td> </tr> </form> HTML
Am getting the parameter very well from html file to HELLO.PL, bt am not getting parameter from HELLO.PL to WELCOME.PL, am trying to make it very clean and nice bt the problem is getting parameters from hello.pl to welcome.pl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: getting parameters
by fishmonger (Chaplain) on Nov 29, 2014 at 19:54 UTC | |
by bigup401 (Pilgrim) on Nov 29, 2014 at 20:36 UTC | |
by poj (Abbot) on Nov 29, 2014 at 20:54 UTC | |
by bigup401 (Pilgrim) on Nov 29, 2014 at 22:05 UTC | |
|
Re: getting parameters
by ww (Archbishop) on Nov 29, 2014 at 20:06 UTC | |
by bigup401 (Pilgrim) on Nov 29, 2014 at 20:43 UTC | |
by stevieb (Canon) on Nov 29, 2014 at 20:54 UTC | |
by bigup401 (Pilgrim) on Nov 29, 2014 at 20:58 UTC | |
|
Re: getting parameters (life cycle of variables and programs and data persistence)
by Anonymous Monk on Nov 29, 2014 at 22:10 UTC |