Having difficulties in editing a data and updating it to the database