In this lesson, you learn how to communicate with a MySQL database from a PHP script. PHP actually has two different APIs for MySQL, both of which are covered in this chapter. The first, mysql, is the classic set of functions that are available in all versions of PHP. The new interface is mysqli, which stands for MySQL Improved. It is available only in PHP version 5 and works only with MySQL version 4.1 and higher. The mysqli interface can be used through a set of functions or in an object-oriented manner, to fit the improved OO capabilities of PHP 5. |