Link to home
Start Free TrialLog in
Avatar of rcplan2u
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.
ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rcplan2u
rcplan2u

ASKER

I am not to sure I know what you are trying to say, my cgi script is called with a post.
Do you have any examples of the way this would be written.
Thank you
which language?
 ada, C, fortran, modula, pascal, perl, ruby, shell, ...
just to mention a few ;-)
I am sorry, perl would be the language.
Thank you
my ($meth) = $ENV{'REQUEST_METHOD'} if defined($ENV{'REQUEST_METHOD'});
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";