post controller (add and edit)