I have a form for credit card processing. Currently the form field that collects the amount based on the users input looks like...
Code:
<input type="text" name="chargetotal" value="">
When the form is submitted, it calls to a php script that includes $_POST["chargetotal"] and that amount it charged to the credit card.
I would like to add a text area that automatically calculates and adds 3% to the amount the user enters. This way they know the exact amount they will be charged.
I assume I can just multiply $_POST["chargetotal"] by *.03 before the script sends the amount to charge to the bank so this field does not actually have to be the one the next page uses. It could just be a visual.
How do I make a new text area that automatically updates while leaving "chargetotal" in tact so on submit, the php script picks up $_POST["chargetotal"] properly?
Thanks,
Rich