HTML trying to get the radiobutton support two values

F

Frank H. Shaw

The following code is a sniblit of code which does the following the user is
displayed a radio button and the user choices either each or by dozen pricing
to go in to shopping cart in this case the amount which is the dollor value
is sent to Paypal. I want to also send a different item_number depending on
the radiobutton selected by the user. Example code below for radio button

<input TYPE="radio" CHECKED NAME="amount" VALUE="20.95"></span><span
style="font-size: 10.0pt; font-family: Trebuchet MS">By each</span></p>

<input TYPE="radio" NAME="amount" VALUE="225.00"></span><span
style="font-size: 10.0pt; font-family: Trebuchet MS">By Dozen</span></p>

Since there are no if statements how do a do a little logic in the form code
below or radiobutton code above to go to paypal when paypal button is
selected the following is a sniplet of that code in the form which uses
hidden input fields

<input type="hidden" name="item_number" value="212-E">
<input type="hidden" name="amount" value="20.95">

the logic needs to be put around the above code depending on which radio
button is selected to support the code below

<input type="hidden" name="item_number" value="212-D">
<input type="hidden" name="amount" value="225.00">

It is my understanding that I would have to do it in script for this type of
logic to be supported I am I correct and what scripting languge would I have
to use I would be going to a unix box using redhat and mybe PHP will front
page support this and Can I enbed the PHP script or another scripting lauague
in the existing HTML code. Note at this point I am using the front page
extensions to a unix boxs.

ANY IDEAS ON WHAT I CAN DO??




THANKS
 
P

p c

You will need to use scripting. You submit the form to a response page
which has logic to decide where to submit the form info or what to do
with it. Do a net search for "HTML forms" and ASP/PHPP/CGI/whatever
scripting language your server supports.

...PC
 
F

Frank H. Shaw

Ok how do I go from my HTML to a responce page using PHP The code in HTML is
the following:

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr"
method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="(e-mail address removed)">
<input type="hidden" name="item_name" value="Pro Style ATF Ankle Brace with
Universal Fit">
<input type="hidden" name="item_number" value="212-E">
<input type="hidden" name="amount" value="20.95">
<input type="hidden" name="return"
value="http://www.skolsportsshop.com/success.htm">
<input type="hidden" name="cancel_return"
value="http://www.skolsportsshop.com/cancel.htm">
<input type="hidden" name="currency_code" value="USD">
<input TYPE="image" SRC="https://www.paypal.com/images/sc-but-03.gif"
NAME="submit0"alt="Make payments with PayPal - it's fast, free and secure!"
width="124" height="26">
<input type="hidden" name="add" value="1">
</form>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top