Hello, I am developing the android application. which is going to update the content from android to the web(php webservice). Can anyone give me the sample code for my reference.
There are lots of questions already on StackOverflow regarding calling webservices from Android. Try looking at those.
For example:
http://stackoverflow.com/questions/297586/how-to-call-web-service-with-android
FYI, there should be no difference between a PHP webservice and a webservice written in any other language from the client's (Android's) point of view.
the simpliest way is to use Sockets
. :)
if there are rest service you can use internal apache library - DefaultClient
...
This guide was useful to me in using Android as a REST client. It shows how to use the Android libraries, without external dependencies, to perform basic GET/POST, etc.
Definitely search around if you need more information. There's plenty of resources on the issue.
For this kind of purpose i have recently coded a http client in php scripting which solves your query. It can post the data to the server after that you can save it to the database.