SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Nov 2001
    Fort Lauderdale
    0 Post(s)
    0 Thread(s)

    Question 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 and I am using to troubleshoot my post submissions.

    I was thinking of:

    1. Client submits form
    2. My php form-processor captures the data
    3. My php form-processor then Submits the data via POST or GET to the 3rd party form processor
    4. 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.

  2. #2
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Burlington, Canada
    89 Post(s)
    6 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.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts