This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

Get JSON Data from a PHP Server

The JSON received from the PHP file:

No database is configured so there is no entry to display.

const dbParam = JSON.stringify({"limit":10});

const xmlhttp = new XMLHttpRequest();
xmlhttp.onload = function() {
  document.getElementById("demo").innerHTML = this.responseText;
};
xmlhttp.open("GET", "include/PHP/json_demo_db.php?x=" + dbParam);
xmlhttp.send();

No database is configured so there is no data to display. Visit W3Schools.com to see this example working.