This is a good and simple example of doing one very clear action — sending a command to open a MySQL database connection through the AJAX transport layer. It includes downloadable code examples as well to get you started.
Filed under, “Roll-your-own-Ajax” department.
In this tutorial I will explain how to open a mysql database connection using PHP and the all popular AJAX. The purpose of this article is to demonstrate how the XMLHttpRequest object works within php and the advantages of using it.