Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To ? Form Post to Multiple Locations

Tags:

forms

php

I have a form which I need to POST to multiple scripts. How can I do this the simplest way?

I know it could be done with Javascript, Curl or Snoopy class, but really which is the most simplest and best way to do this.

One of the scripts sends email and it's a php file, the other is hosted elsewhere.

Need to collect data on both scripts.

like image 799
Codex73 Avatar asked Oct 18 '09 16:10

Codex73


1 Answers

The best way to go about it would be to first submit the form to your local script, then use CURL to POST the (filtered) data that was received to the remote script. Then just watch for the response.

Then simply send the email and process the response from the remote script in your local one.

like image 70
BraedenP Avatar answered Oct 11 '22 17:10

BraedenP