Reputation: 73
I have a website made with .php pages. They bring data from the database and then insert into the required areas. However I am trying to make a phonegap app with the same code. Is it possible that I call the PHP pages via AJAX from the app and then present it in the view? I don't know any other way though.
Any suggestions? I don't want to change the code to completely JavaScript because we're near the end of the project.
Upvotes: 1
Views: 815
Reputation:
@Ahsan What you are asking is possible, but you need to rethink you strategy.
Q: CAN YOU USE PHP/ASP/JSF/JAVA/.NET WITH PHONEGAP?
A: A PhoneGap application may only use HTML, CSS, and JavaScript. However, you can make use of network protocols (XmlHTTPRequest, Web Sockets, etc) to easily communicate with backend services written in any language. This allows your PhoneGap app to remotely access existing business processes while the device is connected to the Internet.
This FAQ should also help.
Top Mistakes by Developers new to Cordova/Phonegap
Addendum 2016-03-21 This response answers the implict question.
Convert PHP website to Phonegap application [on hold]
Upvotes: 2