clifgray
clifgray

Reputation: 4419

Retrieve database data with Phonegap

I have a Phonegap app and I have it set up so that the user can upload information to my web server using the FileTransfer object from the API. But then how am I able to retrieve that information? I would like to do it with a PHP command to my SQL databse but I don't think Phonegap supports PHP.

Do I need to have a webpage on my site that handles this data transfer and then spits out the information from the database to my app?

I am using Android to develop this along with Phonegap.

Thanks!

Upvotes: 0

Views: 1520

Answers (1)

Rajat Singhal
Rajat Singhal

Reputation: 11264

Yes you need to have a web app running on your server which provides an api, which your phonegap app will access to get the data..

Make a webpage in php on server that takes required input using GET or POST method and prints the result you need in phonegap app...

From phonegap app call the api using ajax with the required paramaters, and it will return you the data you need...

Response from webapp can be in json or xml format, people prefer json..

You can find enough tutorials on internet to help..

Upvotes: 1

Related Questions