title: curl data array post +multipart/form-data
body: <p>i got stuck during my project, need bit of your advice to find correct path.</p>
  
  <p>here is what i am doing in my php code.
  1)my script create account on third party website(i have no control over this website)</p>
  
  <p>2)there are 5 forms which i have to submit one by one to create account.</p>
  
  <p>3)ii have successfully created code to submit first two forms and after submitting second form , i am getting third form in my response in script.</p>
  
  <p>4)but when i am submitting data for third form, i am getting response in red text that "Please fill up all fields", i am getting this error message, which means that my code is submitting values to "action" form of third form, but some how  its not accepting it or may be possible, my curl doing something wrong while sending data.</p>
  
  <p>all 5 forms are accepting data of content-type "multipart/form-data" and thats y i am sending all my data in array and assigning that array to "CURLOPT_POSTFIELDS".</p>
  
  <p>following is data send by browser to "action" script of form 3.</p>
  
  <pre><code>    -----------------------------792694871670
  Content-Disposition: form-data; name="1"
  
  (Car#21)
  -----------------------------792694871670
  Content-Disposition: form-data; name="2"
  
  (Car#22)
  -----------------------------792694871670
  Content-Disposition: form-data; name="3"
  
  (Car#23)
  -----------------------------792694871670
  Content-Disposition: form-data; name="4"
  
  (Car#24)
  -----------------------------792694871670
  Content-Disposition: form-data; name="5"
  
  (Car#25)
  -----------------------------792694871670
  Content-Disposition: form-data; name="6"
  
  (Car#26)
  -----------------------------792694871670
  Content-Disposition: form-data; name="7"
  
  (Car#27)
  -----------------------------792694871670
  Content-Disposition: form-data; name="8"
  
  (Car#28)
  -----------------------------792694871670
  Content-Disposition: form-data; name="9"
  
  (Car#29)
  -----------------------------792694871670
  Content-Disposition: form-data; name="10"
  
  (Car#30)
  -----------------------------792694871670
  Content-Disposition: form-data; name="19.0.x"
  
  42
  -----------------------------792694871670
  Content-Disposition: form-data; name="19.0.y"
  
  9
  -----------------------------792694871670--
  </code></pre>
  
  <p>and following is array i am posting using curl.</p>
  
  <p>$data_arry3["1"]="(Car#21)";<br>
       $data_arry3["2"]="(Car#22)";<br>
       $data_arry3["3"]="(Car#23)";<br>
       $data_arry3["4"]="(Car#24)";<br>
       $data_arry3["5"]="(Car#25)";<br>
       $data_arry3["6"]="(Car#26)";<br>
       $data_arry3["7"]="(Car#27)";<br>
       $data_arry3["8"]="(Car#28)";<br>
       $data_arry3["9"]="(Car#29)";<br>
       $data_arry3["10"]="(Car#30)";<br>
       $data_arry3['19.0.x']="58";<br>
       $data_arry3['.0.y']="4";       </p>
  
  <p>as far as i know, session,cookies and ref everything seems ok because, i am able to submit first two forms.</p>
  
  <p>i think problem is in data being send by curl to that server, something has changed by curl in data before sending to server, the reason i am saying this name of fields are numbers not alphabet.  may be  i am wrong.</p>
  
  <p>so experts any one can let me know whats i am doing wrong??
  any advice will sure take me out of this.</p>
  
  <p>please if any question do let me know.</p>