|
Posted by NC on 12/17/42 11:56
axlq wrote:
>
> How do I create a form that two submit buttons, where each one
> submits the form input data to a different server?
You can't. Just separate the forms. Like this:
<table>
<tr>
<td><form method="POST"
action="http://www.yoursite.com/path/printinvoice.php">
<input type="hidden" name="custid" value="Customer_ID">
<input type="hidden" name="date" value="Date_of_Invoice">
<!-- more fields if necessary -->
<input type="submit" value="Print Invoice">
</form>
<td>form method="POST"
action="https://www.yourpaymentprocessor.com/path/">
<input type="hidden" name="merchantID" value="Your_Merchant__ID">
<input type="hidden" name="amount" value="Amount_of_Payment">
<!-- more fields if necessary -->
<input type="submit" value="Pay by Credit Card">
</form>
</table>
The invoice printing script and the payment gateway are likely to
require different sets of data anyway...
> Or maybe force everybody to generate an invoice as
> the first step, and after that point they can choose to
> pay it by credit card.
Not a bad idea, either.
Cheers,
NC
Navigation:
[Reply to this message]
|