Reply to Re: Two different POST actions? Possible?

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация