Results 1 to 2 of 2
Sep 12, 2013, 07:51 #1
- Join Date
- Nov 2001
- Fort Lauderdale
- 0 Post(s)
- 0 Thread(s)
PHP: Send form data to php script which then posts data to another script/site?
I use a 3rd party form processor. The issue is, I need a way to redirect the user after submitting data to the 3rd party form processor. The 3rd party processor is zapier.com and I am using requestb.in to troubleshoot my post submissions.
I was thinking of:
- Client submits form
- My php form-processor captures the data
- My php form-processor then Submits the data via POST or GET to the 3rd party form processor
- My php form-processor then redirects the user to a thank you page.
I might be over thinking this, but the only way I see of doing this is making a form that posts data that has been posted to it. Otherwise the form will just send my user to the 3rd party processor without redirecting them to whatever page I choose. The 3rd party form processor doesn't have a way of me using custom redirects.
Sep 14, 2013, 20:11 #2
- Join Date
- Feb 2005
- Burlington, Canada
- 89 Post(s)
- 2 Thread(s)
I would consider using AJAX for this:
1) user fills in info and submits.
2) post is passed to AJAX function ( jQuery ) which posts data to your form processor.
3) on the success handler of the AJAX, process the codes and inject a thank you into the DOM using jQuery.
This approach does not load a new page and no redirects occur. It also ensures that the form cannot be double submitted.