Page 1 of 1

How to post Multiselect list using CURL

Posted: Sun May 18, 2008 9:30 pm
by madhavvyas
Hello ,

I want to post multiselect list using curl here is my code
my post array

Code: Select all

 
Array
(
    [filetype] => tab
    [cateogry] => ALL
    [manufacturer] => ALL
    [invtype] => both
    [columndata] => Array
        (
            [0] => sku
            [1] => sdesc
            [2] => qty
            [3] => price
            [4] => map
            [5] => mrp
            [6] => mfgn
            [7] => mfg
            [8] => upc
            [9] => cat
            [10] => wt
            [11] => fdesc
            [12] => acc
            [13] => pi
            [14] => wa
            [15] => ti
            [16] => imgpath
            [17] => 
            [18] => 
            [19] => 
            [20] => 
            [21] => 
        )
 
    [input] => SUBMIT
)

Here is the string
what I generate

Code: Select all

 
$strQueryString = "filetype=tab&cateogry=ALL&manufacturer=ALL&invtype=both&columndata=Array&input=SUBMIT"
 
My curl code is

Code: Select all

curl_setopt($conn, CURLOPT_URL, $strQueryString );
curl_setopt($conn, CURLOPT_POST, count($post));
curl_setopt ($conn, CURLOPT_POSTFIELDS, $strQueryString );
$page = curl_exec ($conn);
 
but it was not working

Re: How to post Multiselect list using CURL

Posted: Sun May 18, 2008 10:38 pm
by madhavvyas
I also tried

Code: Select all

 
filetype=tab&cateogry=ALL&manufacturer=ALL&invtype=both&columndata[0]=sku&columndata[1]=sdesc&input=SUBMIT
 
but it is not working even