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
In reply to getting parameters by bigup401
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |