I'm sending some data into SalesForce but am having some issues with some values that are destined for a multiple select. I don't beleive this is specific to Salesforce so I'm posting the question here.
This is my current script:
<?php
if($_POST['cis'] == '1'){
$query['00ND0000003viLy'] = array(
'Essential',
'CIS'
);
}else{
$query['00ND0000003viLy'] = 'Essential';
}
foreach ( $query as $key => $value) {
$post_items[] = $key . '=' . $value;
}
$post_string = implode ('&', $post_items);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'xxx');
curl_setopt($curl, CURLOPT_POST, count($post_items));
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_string);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, TRUE);
$result = curl_exec($curl);
curl_close($curl);
echo $result;
?>
At SalesForces' end the value for $query['00ND0000003viLy']
ends up coming in as a string, Array
(when it matches the condition).
How do I assign multiple values to $query['00ND0000003viLy']
so that it can be interpreted as though it were a multiple select?