Link to home
Start Free TrialLog in
Avatar of rcplan2u
rcplan2u

asked on

pass information from an input tag

I would like to find out how to write and INPUT statment with in my CGI script

With in my cgi script I have a HTML form  that pass the information to a Payment processer.
I ahve this information

my cost$ = 12.95;
my $x_amount = $cost  * $quant

I would like to have and  input tag that would enter the value of $quant
so that when you hit the submit button it would write it to the $x_amount.
I ahve the following but does not send the information to $x_amount
print "<input type=\"value\" name=\"quant\" value=\"".$quant."\">\n";

Thank you
ASKER CERTIFIED SOLUTION
Avatar of archaic0
archaic0
Flag of United States of America 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

can you tell me how i can use the input $value[0] in math.
Like having $x_amount  = $price *  $value[0]
which doesn't seem to work that way
It should work as far as I know, but I usually assign those to local variables before working with them.

$quan = $value[0];
$price = $value[1];

$amount = ($price * $quan);