如何将值添加到单选按钮

hi currently am developing my website for payment process. most probably i have completed my work on it. whats my question in my website finally i mentioned payment delivery details which has three radio buttons with values (in pounds).after customer clicks that those buttons the corresponding value should add with addcart and display the final amount. this is the web page i need http://spsmobile.co.uk/make-payment.php/ am tottaly confusing what code should i apply on it. can any one post me the correct code.

happy new year

thanks in adv

Change your form's radio fields to following:

<input name='totalamount' id='totalamount' value='0' />

<div id='rmr'>
    <input name="rmr" id="rmr_signed" type="radio" value="3" />
    <input name="rmr" id="rmr_special" type="radio" value="5.5" />
    <input name="rmr" id="rmr_international" type="radio" value="10" />
</div>

Now by using jquery you can write

in function show_make_payment_validation write

jQuery('#rmr input[type=radio]').each(function(){
   var total = parseInt(jQuery('input[name="rmr"]:checked', '#myForm').val()) + parseInt(jQuery('#totalamount').val());
    jQuery('#totalamount').val(total);
}

Using Radio Buttons:

HTML For each option you create a radio Button:

...
<input type="radio" name="delivery" value="signed" cheked="cheked">text bla</input>
<input type="radio" name="delivery" value="special">more text bla</input>
<input type="radio" name="delivery" value="international">even more text bla</input>

Notie that they all share a common name ("delivery"). The option with the checked="checked" attribute will be selected by default,

PHP I your user submits the form you can acess the selected option with $_POST["delivery"] or $_GET["delivery]. which ine contains the data depends on wheter you use GET or POST for your form.

You cn specify this in the main form element:

<form ... method="POST">...

Why not just give your radio buttons a quick onclick event and update the total accordingly?

Somthing like:

Total: £<span id="total_amt" class="repair-finalamount-txt">0.00</span>
...
<input name="rmr" type="radio" title="3.00" value="1">
<input name="rmr" type="radio" title="5.50" value="2">
<input name="rmr" type="radio" title="10.00" value="3">
...

And for jQuery code:

jQuery('input[type="radio"][name="rmr"]').click(function() {
    jQuery('span#total_amt').val(jQuery(this).attr('title'));
});

I haven't ran or tested it, so no guarantee the above code is flawless ;)