change mysql connection to PDO database connection