update resource php