Saving data when click on save button