WebReference.com has another excerpt from the Addison-Wesley book "PHP and MySQL Web Development" covering the connection between PHP and MySQL using their example from previous chapters.
In this chapter, we explain how to access the Book-O-Rama database from the Web using PHP. You learn how to read from and write to the database and how to filter potentially troublesome input data.
The chapter looks at setting up the connection, choosing the table, running queries against it, getting the information from the results and using prepared statements to do it all in a bit safer way. They also briefly touch on other interface methods (like the PEAR MDB2 library).