Reputation: 19
I dunno if I'm asking this question right. But basicly I'm making a Computer based test app. And I want to make a mobile app for it. So what I just require is knowledge on how to retrieve and send data to my mysql database. I can't use php since phonegap doesn't support it. So how can I successfully integrate a phone gap app written in js with my backend mysql database. Thanks for sharing your knowledge.
Upvotes: 1
Views: 231
Reputation: 563
Two appraches I tested and both worked out well:
This simple approch allows you to communicate with basically any server side implementation; you could therefore theoretically use a php-server to communicate with your database (PHP code reads get/post request, makes database stuff and then echo's the response).
However, using a Servlet
might be the easier approach.
This is definitely the harder approch and therefore I won't recommend it. However, this would still not allow you to use php on client-side.
Note: I write my JavaScript code using GWT. Therefore HTTPRequests
are made easily.
Upvotes: 2