I put a variable (price) to a html form from database. then user changes the price and submit the form and variable is updated in database. I want to keep previous value (last state and show it in the form) but if I update the form variable keeps updating.
What is best way to remember previous value of variable (in array for example) ?