Two PHP classes for connecting to a mysql database and resizing images