Implemented sql edit functionality for post controller