Hi,
In the following:
[code=php]<form action=’test2.jsp’ method=’post’ ENCTYPE=’multipart/form-data’><table border=0>
<tr>
<td><input type=”checkbox” name=”showOption” value=1 checked></td>
<td> Origin(s) </td>
</tr>
<tr>
<td><input type=”checkbox” name=”showOption” value=2 checked></td>
<td> pro(s) </td>
</tr>
<tr>
<td><input type=”checkbox” name=”showOption” value=3 checked></td>
<td> ter(s) </td>
</tr>
<tr>
<td><input type=”checkbox” name=”showOption” value=4 checked></td>
<td> Sel(s) </td>
</tr>
</table></form>
Some items have the same name. Posting directly to a jsp page works as the jsp page uses multi.getParameterValues.
I would like to use curl to post to the jsp page. The jsp page only takes arrays. However, one cannot place in an array different values for a same item. Can you help me undertand how I could overcome this problem and post an array or a jsp string that could be undertood by the jsp page ?
for info, the following does not work :
[code=php]curl_setopt($ch, CURLOPT_POSTFIELDS, array(“showOption”=>”1”, “showOption”=>”2”, “showOption”=>”3”, “showOption”=>”4”));
nor
[code=php]curl_setopt($ch, CURLOPT_POSTFIELDS, array (array(“showOption”=>”1”, “2”, “3”, “4”)));
Many thanks in advance for any help !!