My intention is to query an MySQL database using a PHP script and then send the information to JavaScript.
I know how to encode the info into the JSON and send the request to the server script.
How does the PHP script know it has been queried it should answer?