[SOLVED] Correct way to retrieve data from SQL

Check the console on the browser you are testing in for fails.

If the PHP script has a syntax error, it’ll 500 and may not trigger the error event.

Further more you are making a request to a local resource which you won’t be able to do on production