rcplan2u
asked on
tranfering information from and javascript order form to a cgi script
With-in my javascript order form i have the following input code
document.writeln('<INPUT TYPE="hidden" NAME="x_Amount " VALUE=" '+MakeTwo(totprice)+'" SIZE="40">');
I would like to find out how I would be able to transfer the value of this
input code once it submitted to a cgi script, to a variable $x_Amount with in the cgi script.
document.writeln('<INPUT TYPE="hidden" NAME="x_Amount " VALUE=" '+MakeTwo(totprice)+'" SIZE="40">');
I would like to find out how I would be able to transfer the value of this
input code once it submitted to a cgi script, to a variable $x_Amount with in the cgi script.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
which language?
ada, C, fortran, modula, pascal, perl, ruby, shell, ...
just to mention a few ;-)
ada, C, fortran, modula, pascal, perl, ruby, shell, ...
just to mention a few ;-)
ASKER
I am sorry, perl would be the language.
Thank you
Thank you
my ($meth) = $ENV{'REQUEST_METHOD'} if defined($ENV{'REQUEST_METH OD'});
my (buffer);
if ($meth eq 'POST') {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
}
foreach my $pair (split(/&/, $buffer)) {
my ($name, $value) = split(/=/, $pair);
# probably a lot of checks nedded here
$::FORM{$name} = $value;
}
print "got= $::FORM{'x_Amount'} \n";
my (buffer);
if ($meth eq 'POST') {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
}
foreach my $pair (split(/&/, $buffer)) {
my ($name, $value) = split(/=/, $pair);
# probably a lot of checks nedded here
$::FORM{$name} = $value;
}
print "got= $::FORM{'x_Amount'} \n";
ASKER
Do you have any examples of the way this would be written.
Thank you