+ Start a Discussion
withoutmewithoutme 

PHP form

I am modifiying an old php form which post's data to a sql database and also emails the same  - with webtolead coding.

The web-to-lead part works great - all leads come into to salesforce without any problems. But now the insert to sql database and email out stopped working.

 

I think the problem is when I assign local variable with the $_POST data. Is it ok to do something like this for a custom field

 

$eveningphone = $_POST['00N80000003a4s'];

 

Can I assign the 18digit salesforce ID in this way? 

withoutmewithoutme

I figured out what my problem is

In the webtolead form, I use the action https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8

 

to post to salesforce. Since this happens, the data is no longer available for the PHP, hence entirely skips the part where DB insert is done. Please help, how do I make the  php code with form so that, it posts to salesforce and also inserts to sql database.