@Frank Weiss Yes you were right, I put all the code in a doPost method and now it shows no error. thanks a lot.
I will get you back as i cannot test it right now bcz my server is down. @20pul10 In original code there is a serverURL. I can post my data in mySQL using PHP but I want to show a message on the android device either data is successfully sent or not. Thanks guys for your help Atif On Jan 18, 11:06 pm, Frank Weiss <[email protected]> wrote: > You may have already figured this out. > > String bytesSent; > > is a valid field definition, but the following line: > > httppost = new HttpPost(serverURL); > > is a statement and belongs in a method or initialized 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

