title: PHP curl not posting to correct fields
body: <p>I'm using curl to retrieve some data on a post request, I'm having a little trouble with the fields as it doesn't seem to be correctly posting to the correct fields. The form consists of just a text area and a submit button.</p>
  
  <pre><code>&lt;form action="other.php" name="form1" id="formID" method="post"&gt;
  &lt;textarea rows="1" cols="1" id="txtareaID" name="txtAreaName"&gt;&lt;/textarea&gt;
  &lt;input type="submit" id="btnID" name="btnName" value="btnValue" title="btnTitle"&gt;
  </code></pre>
  
  <p>This is the fields variable:</p>
  
  <pre><code>$this-&gt;fields = "txtAreaName=". $this-&gt;num . "&amp;btnName=btnID";
  </code></pre>
  
  <p>I am not entirely sure how to identify the submit button in this case..</p>
  
  <p>and here is the curl array:</p>
  
  <pre><code>array(
    CURLOPT_URL   =&gt;  $this-&gt;address,
    CURLOPT_POST =&gt;   true,
    CURLOPT_RETURNTRANSFER =&gt; true,
    CURLOPT_POSTFIELDS =&gt; $this-&gt;fields
  );
  </code></pre>