|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
POST to two files
Hi guys,
Is it possible for us to post values in a form to two different files at the same time ? e.g order.htm -> creditcard.php and thankyou.php (at the same time) by assuming that both files are from different server. As far as i know, i can only include a file name in the action,,, can i put to action in a form ? Please advise. |
|
#2
|
||||
|
||||
|
a form can only post to one file...
but that file can in turn pass values to another file... what is it you're trying to do? [perhaps we could help you work out an alternate method] |
|
#3
|
|||
|
|||
|
i am thinking to post a part of the info a file that process the credit card (a server that manage by other company) and then another file (my own server) will display something like "YOur order will be processed" and send email to the clients and myself.
Hope you guys get what i am trying to say.. p.s: actually i wanted to do this by using CURL .. but i dun have any idea how to make it works.. is it CURL can be used no matter who my bank merchant is ? please advise. |
|
#4
|
||||
|
||||
|
Typically, when you're posting credit card data to another company's site, they'll send you back a return value that you can use to generate your thank-you page. Also, you should be able to post to multiple URLs by submitting the form to one of your pages and having that page perform the multiple post operations before printing the results or redirecting to a status page.
|
|
#5
|
|||
|
|||
|
do you mind to explain a little bit more to me how can i use multiple POST in a form ?
thanks |
|
#6
|
||||
|
||||
|
Well, the form itself would perform just one POST, to a script you've written. That script would in turn perform the two POSTs to separate URLs using cURL or whatever other mechanism you choose. The flow would be as follows:
- Form POSTs to script.php - Then script.php does the following: - POST appropriate data to the outside vendor - Perform any other operations, such as database updates within your own database - Either post to the next page you want to post to or print out results based on the return of the original POST. Look up the specs on cURL to see how to POST "behind the scenes" from within a script. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > POST to two files |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|