June 2005
Intermediate
720 pages
20h 6m
English
In Chapter 7, “Using PHP with MySQL,” I introduced the standard set of PHP functions used to interact with a MySQL database. These functions have been around for years and will certainly get the job done. But new to PHP as of version 5 is the Improved MySQL Extension functions, designed to take advantage of features added in MySQL 4.1 (they specifically work with MySQL 4.1.3 and later). If your server meets these requirements, you may want to consider using these functions in your PHP applications. Generally speaking, they are both faster and more secure than the basic MySQL functions.
To start, connect to MySQL using the mysqli_connect() function.
$dbc = mysqli_connect ('localhost', → 'username', 'password'); ...Read now
Unlock full access