Tag Archive: mysql

Sep
04

Use a PHP class to connect to a database

Often times I’ve found myself wanting a quick and easy way to set up a connection to a MySQL database in PHP. In procedural code this was often accomplished by adding a few lines of code atop the first PHP file in the program. I’ve decided to write an object that uses the constructor to …

Continue reading »