I understand that an application made in phonegap does not accept php, but the application that I use requires it for logins and information searches in a database. and for a topic in this regard I understood that the php files were not included to be packaged and create the apk in build.phonegap resulting in this, I would like to know how I create the communication between the application on the cell phone and the php files that I left on the server (which are the ones you communicate with)
As a clue I have that in the same publication that I saw that the php were not included for packaging, it said that it gave some permission... but I did not understand that well
Indeed, you cannot add PHP in the PhoneGap application. What you could do is have your PHP files on a server (as you seem to indicate you already have) and call them using JavaScript and AJAX.
This could be easily achieved by doing something like this (I'm using jQuery as an example):
This procedure is more or less standard and common to any other web application (with or without PhoneGap), but there is still one step you have to do: for security queries to external servers can be cut off by Cordova/PhoneGap, you have to add a list white of domains to which your application will be able to make requests and queries .
To add your domain to the white list you must:
Add the domains that are allowed access:
Reference and useful links: