AJAX Database
AJAX Database Example
The following example will demonstrate how a web page can fetch information from a database with AJAX:
Person info will be listed here...
Example Explained - The MySQL Database
The database table is like this:
| id | Name | Age | Salary | Designation |
|---|---|---|---|---|
| 1 | Divya | 41 | 25000 | Desinger |
| 2 | Lois | 30 | 22000 | Editor |
| 3 | Joseph | 39 | 50000 | Web Developer |
| 4 | Glenn | 41 | 32000 | Data Analyst |
Example
Example Explained
In the example above, when a user selects a person in the dropdown list above, a function called "showUser()" is executed.
The function is triggered by the onchange event.