homepage Welcome to WebmasterWorld Guest from 54.166.62.226
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque

Webmaster General Forum

    
Help: POST-ing form results to two places
Whoopage

5+ Year Member



 
Msg#: 3590228 posted 8:04 pm on Mar 3, 2008 (gmt 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]

 

BananaFish

5+ Year Member



 
Msg#: 3590228 posted 10:33 pm on Mar 3, 2008 (gmt 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.

Whoopage

5+ Year Member



 
Msg#: 3590228 posted 11:12 pm on Mar 3, 2008 (gmt 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

jtara

WebmasterWorld Senior Member jtara us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 3590228 posted 12:58 am on Mar 4, 2008 (gmt 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.

phranque

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



 
Msg#: 3590228 posted 1:45 am on Mar 4, 2008 (gmt 0)

welcome to WebmasterWorld [webmasterworld.com], Whoopage!

BananaFish

5+ Year Member



 
Msg#: 3590228 posted 2:54 am on Mar 4, 2008 (gmt 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)

jtara

WebmasterWorld Senior Member jtara us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 3590228 posted 3:17 am on Mar 4, 2008 (gmt 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.

BananaFish

5+ Year Member



 
Msg#: 3590228 posted 3:46 am on Mar 4, 2008 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved