こんにちはサー私はデータのリストをphpサーバーに送信したいです私は次のコードを使用していますそれは正しいかどうか教えてください
i try this code
ArrayList<String>list1=new ArrayList<String>();
for(int i=0;i<json.length();i++)
{
JSONObject e = json.getJSONObject(i);
list1.add(e.getString("menuname"));
}
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
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()
上記のコードが正しいかどうかを確認してください..教えてください