CRUD class written in PHP