jsarrel
03-14-2006, 01:27 AM
Here are two simple scripts I'm trying to run:
-------------------------------------------------
junk1.cgi:
#!/usr/bin/perl -wT
use strict;
use CGI;
my $cgi = new CGI;
print $cgi->header("text/plain");
print <<EOT;
<html>
<body>
<form method="GET" action="junk2.cgi">
<input name="text" type="text">
<input type="submit" value="Submit">
</form>
</body>
</html>
EOT
--------------------------------------------------
junk2.cgi:
#!/usr/bin/perl -wT
use strict;
use CGI;
my $cgi = new CGI;
print $cgi->header("text/plain");
print "These are the paramters I received:\n\n";
my ($name,$value);
foreach $name($cgi->param){
print "$name:\n";
foreach $value( $cgi->param($name)){
print " $value\n";
}
}
----------------------------------------------
Basically the first script is just a textbox and a submit button.
The second script displays the parameters from the referring page.
If I set the method to GET on the first script it runs correctly. If I set the method to POST I get a prompt to save/open instead of running.
I do not want to use GET, the pages I will be doing will have 20-30 fields in them.
I'm not sure where to start, permissions are set, .cgi is setup as a valid perl extension. This is on a reseller account so I don't have that much access to system files. Any ideas?
Thanks!
Jason
-------------------------------------------------
junk1.cgi:
#!/usr/bin/perl -wT
use strict;
use CGI;
my $cgi = new CGI;
print $cgi->header("text/plain");
print <<EOT;
<html>
<body>
<form method="GET" action="junk2.cgi">
<input name="text" type="text">
<input type="submit" value="Submit">
</form>
</body>
</html>
EOT
--------------------------------------------------
junk2.cgi:
#!/usr/bin/perl -wT
use strict;
use CGI;
my $cgi = new CGI;
print $cgi->header("text/plain");
print "These are the paramters I received:\n\n";
my ($name,$value);
foreach $name($cgi->param){
print "$name:\n";
foreach $value( $cgi->param($name)){
print " $value\n";
}
}
----------------------------------------------
Basically the first script is just a textbox and a submit button.
The second script displays the parameters from the referring page.
If I set the method to GET on the first script it runs correctly. If I set the method to POST I get a prompt to save/open instead of running.
I do not want to use GET, the pages I will be doing will have 20-30 fields in them.
I'm not sure where to start, permissions are set, .cgi is setup as a valid perl extension. This is on a reseller account so I don't have that much access to system files. Any ideas?
Thanks!
Jason