Connecting to a MySQL Database Using PHP

This page is a small tutorial on how to connect to a MySQL database using Object Oriented Programming (OOP) in PHP. Because of spammers, you need to log in to update the sample code. The PHP extension that is being used is MySQLi, which comes with default installs of PHP. Ask your web host if you are unsure if MySQLi is installed/enabled on your server. No log in is needed to view the sample and the database output.

Please log in to see the update form.

© Ryan E. Benson 2006 - 2021
Updated on: 03/13/2010 18:40:11 - Chat with Ryan