9. Writing MySQL Programs Using PHP

PHP is a scripting language for writing 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 write PHP-based Web applications that use MySQL. For a comparison of PHP with the C and Perl DBI APIs for MySQL programming, see Chapter 6, “Introduction to MySQL Programming.”

This chapter was written under the assumption that you use PHP in conjunction with the Apache Web server, although you can probably substitute a different server. PHP can be used as an Apache module or as a standalone interpreter used as a traditional CGI program. Running PHP as a ...

Get MySQL, 5th Edition 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.