PHP Help with Form Submit

Hi,

I have a custom HTML form that has a couple radio buttons and a text field that requires a number.

I'm not a php programmer and could use some help with putting together php code to calculate a total based on the radio button selection and the text field number.

-------------------------------
Here is a snippet from the form:
<input value="$1.20 standard design" class="radio radio radio" id="$1.20 standard design" name="radio2" type="radio" />
<label for="$1.20/standard_design" class="radio_label">$1.20/standard_design</label>

  &lt;input value="$2.10 extended_design" class="radio radio radio" id="$1.20 standard design" name="radio2" type="radio" /&gt;
  &lt;label for="$2.10/extended_design" class="radio\_label"&gt;$2.10/extended_design&lt;/label&gt;

<div class="form_element cf_textbox">
<label class="cf_label">Quantity to order? *</label>
<input class="cf_inputbox required validate-number" maxlength="150" size="30" id="text_27" name="text_27" type="text" />
</div>
-------------------------------

I need PHP code to take one of the Radio button values and then multiply it by the Quantity, then from the the discount table apply the appropriate discount and save the total in a variable.

Quantity Discount table is:
50-99 10% Off 400-799 40% Off
100-199 20% Off 800-1999 50% Off
200-399 30% Off 2000-4999 60% Off

I appreciate any help with this.
Thanks

I suggest you look up "PHP tutorial" on Google, find a simple example of reading values from the $_POST object, and write some code. It doesn't matter if you get it working perfectly; you can post what you have and ask for help then.

Without showing some effort, I doubt anyone will write the code for you.

I know, I am working on it and will post code for help if I can get it close.

I may need to hire someone to help out.

This should get you started.

<?php

if ($_POST) {
        $total = $_POST['radio1'] * $_POST['text_27'];
        print "Total: $".$total."<br>";
        $qty = $_POST['text_27'];
        switch ($qty) {
        case ($qty > 50 && $qty < 100):
                $dis=10;
                break;
        case ($qty > 99 && $qty < 200):
                $dis=20;
                break;


        }
print "Qty:".$qty."<br>";
print "Discount:".$dis;

} else {
?>

<form method="post" action="<?php $_SERVER['PHP_SELF'];  ?>">
<input class="radio radio radio" id="$1.20 standard design" name="radio1" type="radio" value="1.20"/>
<label for="$1.20/standard_design" class="radio_label">$1.20/standard_design</label>
<br>
<input class="radio radio radio" id="$2.10 extended design" name="radio1" type="radio" value="2.10" />
<label for="$2.10/extended_design" class="radio_label">$2.10/extended_design</label>
<br>
<div class="form_element cf_textbox">
<label class="cf_label">Quantity to order? *</label>
<input class="cf_inputbox required validate-number" maxlength="150" size="30" id="text_27" name="text_27" type="text" />
<br>
<input type="submit">
</div>
</form>

<?php
}
?>