in reply to site management with perl

So you display a website generated from a database with a bunch of form elements that correspond to various fields in the database, and you want to know which, if any of the form fields have been changed so you can update the database?

Assuming the above is correct, I seriously wouldn't bother. I doubt you'd gain any real benefit or efficiency from trying to only update the changed elements. Just update all of the fields with the form values. Any win from doing less updating is probably equally offset by the calculations involved in diffing.

Alternatively, storing the original value in a hidden field is probably the best bet. Sure you can't rely that the client hasn't changed the value of the hidden field, but what does that gain them? If they deliberately modify the hidden one to make it the same as the visible, you simply don't update the database and it's their loss. Other wise it works properly with the least amount of fuss.