Problem to update data with function

I follow this example

but I would like to update the db with news params when I change it.
So I created a function that makes a saved button appear when you change a parameter and I would like that when you press this button it updates the db (maybe with a Onclick) I don’t no.

Do you have an idea ?