Thank you.  your response helps me very much.

In addition I found a working code from the internet. It may help ...

# public void postData() {
#     // Create a new HttpClient and Post Header
#     HttpClient httpclient = new DefaultHttpClient();
#     HttpPost httppost = new HttpPost("http://www.yoursite.com/
script.php");
#
#     try {
#         // Add your data
#         List<NameValuePair> nameValuePairs = new
ArrayList<NameValuePair>(2);
#         nameValuePairs.add(new BasicNameValuePair("id", "12345"));
#         nameValuePairs.add(new BasicNameValuePair("stringdata",
"AndDev is Cool!"));
#         httppost.setEntity(new UrlEncodedFormEntity
(nameValuePairs));
#
#         // Execute HTTP Post Request
#         HttpResponse response = httpclient.execute(httppost);
#
#     } catch (ClientProtocolException e) {
#         // TODO Auto-generated catch block
#     } catch (IOException e) {
#         // TODO Auto-generated catch block
#     }
# }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to