homepage Welcome to WebmasterWorld Guest from 54.197.19.35
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque & physics

Webmaster General Forum

    
Help: POST-ing form results to two places
Whoopage




msg:3590230
 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




msg:3590361
 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




msg:3590379
 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




msg:3590434
 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




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

welcome to WebmasterWorld [webmasterworld.com], Whoopage!

BananaFish




msg:3590526
 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




msg:3590541
 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




msg:3590552
 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