View Full Version : Multiple "post" under one submit button

Nov 6th, 2006, 05:40 PM
I found some code of how to call on two posts under one button but could never get the code to work correctly. I will take it from the top and ignore what has been given to me. Any help is appreciated.

Is it possible to have a secure URL https://secure.paymentclearing.com/c.../mas/split.cgi (I have no control over ecommerce secure server) and a formmail.pl under one submit button? In other words:

First part of the form is user information such as Mutal Fund Name, Ticker, and Dollar Invested to be submitted along with a copy of the credit card General information receipt of a purchase. (see link Live Code below)

Second part is the price and general information of the user that is submited to the secure server for credit card processing. (see link Live Code below)

<FORM Method='POST'


Thanks for any help in advance,

Nov 6th, 2006, 06:01 PM
one form cannot have 2 actions.

If you want to submit 1 form twice then you're better off submitting it to a control script and then sending data to each of the destination separately, probably using the cURL library (check out php.net for more info).

If you want to submit 2 forms at the same time, you either have to build up a query in javascript and submit the forms via an XMLHTTPRequest, or you need to put the forms in separate frames/iframes and submit them.

You cannot traditionally submit 2 forms on the same page.

Nov 6th, 2006, 09:12 PM
Thanks Beagle....I will try the frame method. I did look at the cURL on the php site but can not find a route to make it work. The same goes for XMLHTTPRequest. I will keep looking and hope I make something work with sperate frames.