Forum Moderators: coopster
I'm a PHP newbie so this may be a simple question but here goes:
I'm making an online donations page for our charity and the HTML form uses PHP to POST data to WorlddPay (payment processor).
For regular donations (using the FuturePay service) there are 2 variables - amount and normalAmount. This is essentially for how much you want to pay now, and how much you want the regular payments to be. In our case it would be the same - e.g. I want to pay £2 now and £2 every month.
Here's some snippets from our form:
<form action="https://select-test.worldpay.com/wcc/purchase" method=POST><input name="normalAmount" type="text" size="3" maxlength="6" />
so this is sending a value for 'normalAmount' through to WorldPay fine.
Is there an easy way of also sending the same value through as the variable 'amount' ?
In very-bad-PHP it would look something like this:
<?php $amount=$_POST['normalAmount']; ?>
<INPUT TYPE=HIDDEN NAME="amount" VALUE="$amount">
Does that make any sense to anyone?
Thanks,
Ben
[pre]
<form action="https://select-test.worldpay.com/wcc/purchase" method=POST name="payment">
<input name="normalAmount" type="text" size="3" maxlength="6" onChange="document.payment.amount.value = this.value;" />
<input name="amount" type="hidden" value="" />
</form>
[/pre]
Try something along those lines and see how that does.