AppML API (ok)

https://www.w3schools.com/appml/appml_methods.asp

C:\xampp\htdocs\abc\index.php

<!DOCTYPE html>
<html lang="en-US">
<title>Customers</title>
<link rel="stylesheet" href="style.css">
<script src="https://www.w3schools.com/appml/2.0.3/appml.js"></script>
<body>
  <p id="demo"></p>
  <script type="text/javascript">
	  var myObj, myArr, len, i, txt = "";
	  // Create an AppML object and fetch the data
	  myObj = new AppML();
	  myObj.dataSource = "customers.php";
	  myObj.getData();
	  // Locate the data records
	  myArr = myObj.data.records;
	  len = myArr.length;
	  // Display the records
	  for (i = 0; i < len; i++) { txt += myArr[i].CustomerName + "<br>"; } document.getElementById("demo").innerHTML = txt;
  </script>
</body>
</html>

C:\xampp\htdocs\abc\customers.php

Last updated

Was this helpful?