Hey,
How would I be able to retrieve the amount entered into a form, eg. $5.00, and then divide that number by 0.05, and the finally rounding it to the nearest whole number, and display the result?
Maybe this will help:
This is the form I am trying to get the amount from.
html code:
<form name="MyForm" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<fieldset>
<label for="amount">$</label>
<input id="amount" name="amount" value="5.00" />
<label for="custom">Steam ID:</label>
<input id="custom" name="custom" value="<?php echo strstr(curPageURL(), 'STEAM_');?>" />
<input name="business" type="hidden" value="******************" />
<input name="cmd" type="hidden" value="_xclick" />
<input name="currency_code" type="hidden" value="USD" />
<input name="item_name" type="hidden" value="vip" />
<input name="no_note" type="hidden" value="1" />
<input name="no_shipping" type="hidden" value="1" />
<input src="http://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" type="image" alt="Click here to donate">
</fieldset>
</form>
I am trying to get the amount entered by the user, which as you can see above, defaults to $5.
Many thanks.