Problem with saving data after using js/php macro


I need help - how better save data using js/php macro after changing values in html?
I tried to it with js cookies but actually i need to send some request to save values for other users (send it to database or save and renew it in macros parameters on page)

How can i do it better?