How a config.php file can be your best friend


How a config.php file can be your best friendI use a config file in almost every PHP applications I write. Essentially I create an array called $config and setting everything I would like to be able to quickly change. For example: app name, full path to app, full url to app, development or production mode, even mysql settings.... [More]

Checking MySQL for duplicate content


Checking MySQL for duplicate contentA number of the sites I manage run a custom CMS written from the ground up. A problem I ran into recently for one of my larger sites with over 5,500 content items is how to check if a new item might be a duplicate before its added. The solution... [More]

Storing an array in MySQL from PHP


Storing an array in MySQL from PHPThere has been a number of times I wanted to store an array in a database. There was no need to split the data up and save it into individual cell. Maybe it was just debugging data or I wanted to store all the extra stuff a payment processor returns.... [More]
1  Next