You need to sign in to do that
Don't have an account?

Posting to servlet.WebToLead from PHP : anyone got it working'
Hi,
I'm trying to POST to WebToLead service through the servlet http://www.salesforce.com/servlet/servlet.WebToLead however I do not seem to beable to get the thing to work. The HTML generated from salesforce.com works fine, then I would presume posting the same information as in the form to http://www.salesforce.com/servlet/servlet.WebToLead would also work but no leads are generated in salesforce.com.
Has anyone got this to work from PHP? Has anyone got some working example code?
p.s. I do not want to use the API.
Thanks for your time
Tim
I'm trying to POST to WebToLead service through the servlet http://www.salesforce.com/servlet/servlet.WebToLead however I do not seem to beable to get the thing to work. The HTML generated from salesforce.com works fine, then I would presume posting the same information as in the form to http://www.salesforce.com/servlet/servlet.WebToLead would also work but no leads are generated in salesforce.com.
Has anyone got this to work from PHP? Has anyone got some working example code?
p.s. I do not want to use the API.
Thanks for your time
Tim
Tim,
Couple of possibilities:
1. You are checking for the new Lead too soon. It takes a few seconds to show, sometimes minutes.
2. Make sure all those *hidden* fields are being passed too. Especially OID.
Code:
Here's a sample which generates a post to the servlet.
It's called from a modified version of the salesforce generated form. The generated form is changed to post all the same data to this php routine, which then re-posts it to salesforce.
this looks really interesting - please could you tell me what is in the include in line 2, and I'm struggling a bit with a task very similar to this!
thanks,
Austen