how to pass arralylist in basic namevalue pairs in android
<p>Hello Sir  i want send list of data to php server i use following code is it correct or not please tell me</p>

<pre><code>        i try this code
           ArrayList&lt;String&gt;list1=new ArrayList&lt;String&gt;();
    for(int i=0;i&lt;json.length();i++)
    {
        JSONObject e = json.getJSONObject(i);
        list1.add(e.getString("menuname"));
    }

    ArrayList&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;();
    nameValuePairs.add(new BasicNameValuePair("menuname",list1.toString()));


        HttpClient httpclient = new DefaultHttpClient();
        HttpPost httppost = new HttpPost("http://192.168.0.103/update.php");
        // "http://192.168.1.12/addnotes.php");
                //url+"Notes/addnotes.php");
        httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
        HttpResponse response = httpclient.execute(httppost);
        HttpEntity entity = response.getEntity();
        is = entity.getContent();
        Toast.makeText(getApplicationContext(),
                "Saved Sucessfully", Toast.LENGTH_SHORT).show()
</code></pre>

<p>please see the above code is correct or not .. please tell me</p>
