Android: Send HTTP post with multiple values to Web Server
<pre><code>  List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(2);
nameValuePairs.add(new BasicNameValuePair("id", "12345"));
nameValuePairs.add(new BasicNameValuePair("stringdata", "AndDev is Cool!"));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
</code></pre>

<p><a href="http://www.androidsnippets.com/executing-a-http-post-request-with-httpclient" rel="nofollow">http://www.androidsnippets.com/executing-a-http-post-request-with-httpclient</a>
I would like to add more ids and stringdatas,</p>

<pre><code>List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;();
nameValuePairs.add(new BasicNameValuePair("id", "12345"));
nameValuePairs.add(new BasicNameValuePair("stringdata", "AndDev is Cool!"));
nameValuePairs.add(new BasicNameValuePair("id", "12348"));
nameValuePairs.add(new BasicNameValuePair("stringdata", "wassup"));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
</code></pre>

<p>When I try above code, the server only get the last id and stringdata values. How can I send multiple IDs using one HTTP Post Request?</p>
