Chapter 8. The PHP API

PHP is a scripting language that lets you write Web pages containing embedded code that is executed whenever a page is accessed and that can generate dynamic content to be included as part of the output sent to a client's Web browser. This chapter describes how to use PHP to write Web-based applications that use MySQL. For a comparison of PHP with the C and Perl DBI APIs for MySQL programming, see Chapter 5, "Introduction to MySQL Programming."

The examples in this chapter draw on our sample database, samp_db, using the tables that we created for the grade-keeping project and for the Historical League in Chapter 1, "Introduction to MySQL and SQL." We'll cover PHP 3, although as I write PHP 4 is in beta testing and may ...

Get MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.