Msg#: 3829533 posted 2:57 pm on Jan 19, 2009 (gmt 0)
1) POST the form field values to an external URL (for an affiliate program)
2) grab some XML data returned by the external URL (to tell me whether the form was accepted, give me a unique ID for it, etc.)
3) log that XML data PLUS the original form field values in a local MySQL database
4) send the user to a thank-you page on my own site
Please help point me in the right direction if you can.....
Msg#: 3829533 posted 3:16 pm on Jan 19, 2009 (gmt 0)
Msg#: 3829533 posted 4:07 pm on Jan 19, 2009 (gmt 0)
Personally I haven't used PHP for a while so the actual details I don't know. From what you listed though I would have a PHP processing script that the page submits to, could be the same page. Then do all the processing there and redirect to an error page/form page with error message, or send to thank you page.
Looking at some search results the header does sound like it would work. Do you have access to curl? I would try curl first if your server has the library.
Msg#: 3829533 posted 6:24 pm on Jan 19, 2009 (gmt 0)
I've refined my issue a bit... trying to figure out if I have access to curl.
I can use PHP Header to send a GET, but the issue is that it then visibly displays the server response. I'm trying to find a way of using PHP to send the form data using GET or POST that happens entirely behind the scenes, so all the user sees is the thank-you page on my site.
Then I need to use PHP to parse the XML response from the server, but first things first.....