Could someone please tell my why this won't work. THe value purchase.value seems to be blank. Is there any way to get the value of a radio box?
<table width="57%" border="0" align="center" cellpadding="5" cellspacing="5">
<tr>
<td width="14%"><div align="center">
<input type="radio" name="purchase" id="printed" value="printed" />
</div></td>
<td width="86%">printed
Order Printed Version <br />
$13.95 +
4.50 shipping & handling</td>
</tr>
<tr>
<td><div align="center">
<input type="radio" name="purchase" id="pdf" value="pdf" />
</div></td>
<td> <div align="left">pdf
Order PDF Version (3.6MB PDF)</div></td>
</tr>
</table>
<p align="center">
<form id="form1" name="form1" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="3L92AW5YFFSAU">
<input type="hidden" name="lc" value="US">
<? if ($purchase.value == "printed"){ ?>
<input type="hidden" name="amount" value="13.95">
<input type="hidden" name="shipping" value="4.50">
<? } else { ?>
<input type="hidden" name="notify_url" value="http://www.timespaceorg.com/paypal.php">
<input type="hidden" name="amount" value="11.95">
<? } ?>
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="cn" value="Add special instructions to the seller">
<input type="hidden" name="return" value="http://www.timespaceorg.com/thankyou.html">
<input type="hidden" name="cancel_return" value="http://www.timespaceorg.com/order_book.php">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form>