HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
AJAX can be used to dynamically communicate with the database.
The following example will demonstrate how a web page via AJAX to read information from the database: Please select a client in the following drop-down list:
When a user in the above drop-down list, select a customer, it executes called "showCustomer ()" function. This function by the "onchange" event is triggered:
showCustomer () function performs the following tasks:
Server page called by the JavaScript above is a PHP file named "getcustomer".
Written in PHP server files easily, or other server language. See the corresponding example written in PHP .
"Getcustomer" source code responsible for the database query, then returns the results in HTML form: