General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 10th, 2003, 08:40 PM
Alicia Alicia is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 116 Alicia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 49 sec
Reputation Power: 6
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.

Reply With Quote
  #2  
Old December 10th, 2003, 08:54 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
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]

Reply With Quote
  #3  
Old December 11th, 2003, 12:18 AM
Alicia Alicia is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 116 Alicia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 49 sec
Reputation Power: 6
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.

Reply With Quote
  #4  
Old December 11th, 2003, 06:48 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
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.

Reply With Quote
  #5  
Old December 11th, 2003, 07:21 PM
Alicia Alicia is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 116 Alicia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 49 sec
Reputation Power: 6
do you mind to explain a little bit more to me how can i use multiple POST in a form ?

thanks

Reply With Quote
  #6  
Old December 12th, 2003, 06:49 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
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:
&nbsp;&nbsp;&nbsp;&nbsp;- POST appropriate data to the outside vendor
&nbsp;&nbsp;&nbsp;&nbsp;- Perform any other operations, such as database updates within your own database
&nbsp;&nbsp;&nbsp;&nbsp;- 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.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > POST to two files


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT