learnhtml
  • Responsive thẻ meta
  • 🥹[GSAP] một mẫu sử dụng ScrollTrigger, Observer, ScrollSmoother crack (ok)
  • 😝Font Awesome Kits are here to save the day! Fast, flexible, friendly, and full of icons (ok)
  • 😅Custom Map
  • 🥰D3.js render Vietnam map (ok)
  • 😆Free Vietnam SVG Map (ok)
  • Tính khoảng cách đường bay Airport Distance Map
  • 😍Bộ công cụ chuyển đổi Text to SVG && Animation 😉
  • 😅Cách sử dụng aspect ratio với CSS3, video aspect-ratio (ok)
  • 😅is there a way I can create an Email link defaulting to Gmail? (ok)
  • 😅document.write jquery-3.7.0.min.js (ok)
  • 😅CodePen Home File Sharing Web App (ok)
  • 😅Template Tiktok khamphukhoa.net.vn (ok)
  • 😅Div Table Full (ok)
  • 🧐Coreui giao diện admin sử dụng bootstrap 5 (ok)
  • 😆Type datetime-local (ok)
  • [Admin] AdminLTE (ok)
  • [ADMIN] Laravel Admin (ok)
  • Thẻ colgroup cho phép chúng ta điều chỉnh độ rộng của table (ok)
  • Tổng quan về Material Design Lite
  • Fullscreen Horizontal Page Slider with jQuery and CSS3 - HSlider scroll template html (ok)
  • Bảng mã ký tự hay dùng :))) trong html
  • Tất cả những gì bạn cần biết về thuộc tính Data trong HTML5
  • Responsive Images trên Web
  • Tìm hiểu về BEM trong 15 phút
  • Cách sử dụng base để copy đường dẫn :(
  • Structure website HTML
  • Show Heading (ok)
  • Refused to display site in an iframe, X-Frame-Options to 'SAMEORIGIN' (ok)
  • --------- Start AppML --------------
  • AppML Tutorial (ok)
  • appml-include-html, appml-controller (ok)
  • AppML Messages (ok)
  • AppML API (ok)
  • AppML PHP (ok)
  • --------- End AppML --------------
Powered by GitBook
On this page

Was this helpful?

AppML PHP (ok)

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

PreviousAppML API (ok)Next--------- End AppML --------------

Last updated 4 years ago

Was this helpful?

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

<!DOCTYPE html>
<html lang="en">
<title>Customers</title>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<script src="https://www.w3schools.com/appml/2.0.3/appml.js"></script>
<body>
  <div class="w3-container" appml-data="appml.php?model=model_customers">
    <h1>Customers</h1>
    <table class="w3-table-all">
      <tr>
        <th>Customer</th>
        <th>City</th>
        <th>Country</th>
      </tr>
      <tr appml-repeat="records">
        <td>{{CompanyName}}</td>
        <td>{{City}}</td>
        <td>{{Country}}</td>
      </tr>
    </table>
  </div>
</body>
</html>

C:\xampp\htdocs\abc\create_customers.htm

<!DOCTYPE html>
<html>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<script src="https://www.w3schools.com/appml/2.0.3/appml.js"></script>
<script type="text/javascript" src="create_customers.js"></script>
<body>
  <div appml-data="appml.php?model=create_customers"></div>
</body>
</html>

C:\xampp\htdocs\abc\create_customers.js

{
  "database": {
    "connection": "mydatabase",
    "execute": [
      "DROP TABLE IF EXISTS customers",
      "CREATE TABLE `appml`.`customers` ( `CustomerID` INT(10) NULL AUTO_INCREMENT , `CompanyName` VARCHAR(100) NOT NULL , `ContactName` VARCHAR(100) NOT NULL , `Address` VARCHAR(100) NOT NULL , `City` VARCHAR(100) NOT NULL , `PostalCode` VARCHAR(100) NOT NULL , `Country` VARCHAR(100) NOT NULL , PRIMARY KEY (`CustomerID`)) ENGINE = InnoDB",
      "INSERT INTO customers(CompanyName,ContactName,Address,City,PostalCode,Country) VALUES (\"Alfreds Futterkiste\",\"Maria Anders\",\"Obere Str. 57\",\"Berlin\",\"12209\",\"Germany\")",
      "INSERT INTO customers(CompanyName,ContactName,Address,City,PostalCode,Country) VALUES (\"Around the Horn\",\"Thomas Hardy\",\"120 Hanover Sq.\",\"London\",\"WA1 1DP\",\"UK\")",
      "INSERT INTO customers(CompanyName,ContactName,Address,City,PostalCode,Country) VALUES (\"Blauer See Delikatessen\",\"Hanna Moos\",\"Forsterstr. 57\",\"Mannheim\",\"68306\",\"Germany\")"
    ]
  }
}

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

<?php echo ("Access Forbidden");exit(); ?>
{
	"dateformat" : "yyyy-mm-dd",
	"databases" : [{
    "connection" : "mydatabase",
    "host" : "localhost",
    "dbname" : "appml",
    "username" : "root",
    "password" : ""
	}]
}

C:\xampp\htdocs\abc\model_customers.js

{
  "rowsperpage": 10,
  "database": {
    "connection": "mydatabase",
    "sql": "SELECT * FROM Customers"
  }
}
10KB
abc.rar