Saving user inputs by presetting it from the database field

Hi there,

I am currently working on a website that would enable users to select options from the dropdown menus itself and not having it reset if the user leaves or refreshes the browser. In other words, I would like to save the data locally, however, I would like to have all users to be able to see the inputs made by other users. The inputs made by the users include text inputs, dropdown menus, and other various features. Someone suggested that I save user inputs by presetting it form the database field. I am not familiar with this, can someone help me with the coding? Thank you.