Welcome to WebmasterWorld Guest from 54.227.47.228

Forum Moderators: phranque

Message Too Old, No Replies

Help: POST-ing form results to two places

     
8:04 pm on Mar 3, 2008 (gmt 0)

New User

5+ Year Member

joined:Mar 3, 2008
posts:2
votes: 0


Hello all - I'm new to the site and could really use some help.

I am working on a form for a leads generation site and I am having some issues with the form processing and the posting of the results.

I want to post to a third party lead collector, and they have given me a URL to do so. It looks something like this:

http://www.example.com/.../LeadImport.asmx/LeadReceiver

Everything works fine when I use that URL in the action of the form, and everything is posted through. The problem is, doing it this way the user is redirected to the above URL and away from my site.

What I need to do is have a form processing script that will take the post results, post to the URL, but redirect the user to a ThankYou page on my site.

I really have no idea how to write such a script though (I'm still a novice in all areas of programming).

Can anyone help me with this issue, get me started, or perhaps even provide code examples as to how this would be done?

Thanks!

EDIT: I just realized this might need to go in the PHP section... I don't know if I want to post there again though, I don't want to get in trouble.

[edited by: Whoopage at 8:10 pm (utc) on Mar. 3, 2008]

10:33 pm on Mar 3, 2008 (gmt 0)

Full Member

10+ Year Member

joined:Sept 7, 2005
posts:242
votes: 0


With php it's rather simple. You keep the posted information on your site then use curl to post the information to the 3rd party site. This is often done when accessing 3rd party APIs and such.
11:12 pm on Mar 3, 2008 (gmt 0)

New User

5+ Year Member

joined:Mar 3, 2008
posts:2
votes: 0


Thank you for your reply BananaFish - I just figured that out and started working on curl right before I say your post.

Thanks again

12:58 am on Mar 4, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member jtara is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 26, 2005
posts:3041
votes: 0


I want to post to a third party lead collector, and they have given me a URL to do so.

I think you may be missing something.

Usually, in that case, the third party will provide a means of redirecting back to your site. A URL or some kind of ID that you pass along with the other data.

Obviously, there has to be some kind of ID that you send them in any case.

Perhaps they simply haven't configured their database with your redirect URL?

Or, this could be done in an AJAX-y way with Javascript. I'd be surprised if the third party doesn't provide some Javascript to do this.

1:45 am on Mar 4, 2008 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10550
votes: 10


welcome to WebmasterWorld [webmasterworld.com], Whoopage!
2:54 am on Mar 4, 2008 (gmt 0)

Full Member

10+ Year Member

joined:Sept 7, 2005
posts:242
votes: 0


Usually, in that case, the third party will provide a means of redirecting back to your site. A URL or some kind of ID that you pass along with the other data

With curl you post a request to a website or web service API and receive a response back as a result. Not sure what you mean is missing in this scenario? (Maybe you're thinking of something ancient like Paypal IPN)
3:17 am on Mar 4, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member jtara is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 26, 2005
posts:3041
votes: 0


I just find it hard to believe that you have to go to this much trouble - how many webmasters would use such a service?

I have got to believe that the service provider has anticipated the need to redirect back to your site, and has provided some solution for you.

That's what I suppose you are missing.

3:46 am on Mar 4, 2008 (gmt 0)

Full Member

10+ Year Member

joined:Sept 7, 2005
posts:242
votes: 0


I just find it hard to believe that you have to go to this much trouble - how many webmasters would use such a service?

Just about anyone that uses Google or Yahoo APIs just to mention a handful.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members