• Rare Method
  • 0 Points
  • Member since 2006

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1

I am developping a contact form and I have to make a double post (in php), one on my website to save data in the database and another one on salesforce website.

For this task I am using Curl, it nearly works but I am getting problems for multiple select.

Here is my php code :

$information_requested = $_POST["information_requested"];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.salesforce.com/servlet/servlet.WebToLead?encoding=ISO-8859-1" );
curl_setopt($ch, CURLOPT_POST, 1 );

$postContent .= "oid=00D300000000TGF&";
$postContent .= "00N30000000wTNa=$informationsRequested";
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postContent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$postResult = curl_exec($ch);


Here is my html code :

<input type="checkbox" name="information_requested[]" value="Product1">
<input type="checkbox" name="information_requested[]" value="Product2">
<input type="checkbox" name="information_requested[]" value="Product3">

In my form, informations requested are an array of checkbox.
But salesforces need a <select multiple="multiple"><option value="product1"></option></select>. I don't know if this is the problem, but maybe I don't *construct* the query in the right way.

Do you have an idea ?

Thanks a lot fro your help.

Thierry Bucco