Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Aug 2010
    Posts
    405
    Thanks
    17
    Thanked 2 Times in 2 Posts

    double-submit form

    I'm working on a page with a form. I pull the form code from a 3rd party company that then takes the post data and puts it into their database. But what I'm trying to figure out is a way to process that form and send a 'text-only email to another internal database - without interfering with the primary action in any way.

    Essentially, a form with two posts?? I'm not sure how to do this but I'd like to avoid a javascript solution, if possible. Maybe there's a simple solution. But it's a new thing to me.

    I'm open to ideas, whether a php or otherwise.

    for the sake of a starting point. Here's the form tag as it is right now :

    PHP Code:
    <form method="post" name="$500-offer_PPC-google" action="https://12as45521vg.t.eloqua.com/e/f4" id="form1241" >
    several inputs...
    and 
    a submit...
    </
    form

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    You would need to verify TOS for using the functionality you propose as intercepting is considered to be interfering with the originating communications, but you can use curl for this.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    Regular Coder
    Join Date
    Aug 2010
    Posts
    405
    Thanks
    17
    Thanked 2 Times in 2 Posts
    hmmmm... would my boss call that an inelegant solution, or is it worth suggesting?

    The other thing I was thinking, is that maybe I could set up a backend cgi script that processes it, then sends the data just "as-is" to the original 3rd party url?

    I have nil experience with tweaking cgi mail scripts, though.

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Right, which would use either curl or sockets, so it doesn't matter if you are using PHP or perl or any other language.
    Again, you have to verify that you are allowed to do this via their TOS; automation and interception are among the first five things in the TOS I use.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

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