madhavvyas Posted May 19, 2008 Share Posted May 19, 2008 Hello , I want to post multiselect list using curl here is my code my post array 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 $strQueryString = "filetype=tab&cateogry=ALL&manufacturer=ALL&invtype=both&columndata=Array&input=SUBMIT" My curl code is 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 Quote Link to comment Share on other sites More sharing options...
Northern Flame Posted May 19, 2008 Share Posted May 19, 2008 put the array in a variable, $array = array(/* your array here*/); then change: $strQueryString = "filetype=tab&cateogry=ALL&manufacturer=ALL&invtype=both&columndata=Array&input=SUBMIT" to: $strQueryString = "filetype=tab&cateogry=ALL&manufacturer=ALL&invtype=both&columndata=$array&input=SUBMIT" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.