title: Post data with libcurl
body: <p>I've problem with libcurl. I wrote simple program which should post data (fill the form) but program's not working.
  My form:</p>
  
  <pre><code>...
  &lt;div&gt;&lt;label for="id_person_name"&gt;Your name&lt;/label&gt; &lt;input type="text" id="id_person_name" name="name" /&gt;&lt;/div&gt;
              &lt;div&gt;&lt;/div&gt;
  
              &lt;div class="clear"&gt;&lt;/div&gt;
              &lt;div&gt;&lt;label for="id_comment"&gt;Comment&lt;/label&gt;&lt;textarea name="comment" id="id_comment" rows="10" cols="60" class="txt"&gt;&lt;/textarea&gt;&lt;/div&gt;
  ...
  </code></pre>
  
  <p>Program:</p>
  
  <pre><code>#include &lt;curl/curl.h&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  int main(){
  
  CURL *curl;
  CURLcode res;
  
  curl = curl_easy_init();
  
  if(curl) {
     curl_easy_setopt(curl, CURLOPT_URL, "http://examplesite.com");
     curl_easy_setopt(curl, CURLOPT_POST, 1);
     curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "name=Bjarne&amp;comment=example");
  res = curl_easy_perform(curl);
  curl_easy_cleanup(curl);
  
  cout &lt;&lt; endl;
  }
  return 0;
  }
  </code></pre>
  
  <p>Of course i tested this code: <a href="http://curl.haxx.se/libcurl/c/postit2.html" rel="noreferrer">http://curl.haxx.se/libcurl/c/postit2.html</a> but it's not working.</p>
  
  <p>Can anyone help me ?</p>