PHP class for secure MySQLi transactions