|
Hello,
I created this form using the CGI.pm module. I need to use the parameters from this form in a Perl program. What is the best method to pass these parameters?
Note: I am working on UNIX
Any help in the form of description or helpful links will be great.
Thanks in advance,
Garric
|
|
|
Heres how you can do it.Using the below code would surely work.But simply copying the code would not give you the indepth knowledge.
My advise is to also learn the basics about CGI technolgy and about two methods GET and POST which is used to send data from an HTML form to a script.
#!/usr/bin/perl -w
use CGI;
use CGI qw(:standard);
$v1=new CGI;
print "content-type: text/html \n\n";
print"<html>";
print"<body>";
#Take Inputs from all text fields from HTML form
my $name=$v1->param('fname');
my $company=$v1->param('cname');
my $address=$v1->param('add');
my $cty=$v1->param('city');
print "<br>";
print"</body>";
print"</html>";
|
|
|
Heres how you can do it.Using the below code would surely work.But simply copying the code would not give you the indepth knowledge.
My advise is to also learn the basics about CGI technolgy and about two methods GET and POST which is used to send data from an HTML form to a script.
#!/usr/bin/perl -w
use CGI;
use CGI qw(:standard);
$v1=new CGI;
print "content-type: text/html \n\n";
print"<html>";
print"<body>";
#Take Inputs from all text fields from HTML form
my $name=$v1->param('fname');
my $company=$v1->param('cname');
my $address=$v1->param('add');
my $cty=$v1->param('city');
print "<br>";
print"</body>";
print"</html>";
|
|
|
Heres how you can do it.Using the below code would surely work.But simply copying the code would not give you the indepth knowledge.
My advise is to also learn the basics about CGI technolgy and about two methods GET and POST which is used to send data from an HTML form to a script.
#!/usr/bin/perl -w
use CGI;
use CGI qw(:standard);
$v1=new CGI;
print "content-type: text/html \n\n";
print"<html>";
print"<body>";
#Take Inputs from all text fields from HTML form
my $name=$v1->param('fname');
my $company=$v1->param('cname');
my $address=$v1->param('add');
my $cty=$v1->param('city');
print "<br>";
print"</body>";
print"</html>";
|
|
|
|
|