Sample Code: prevent web page overwrites

Below are some interesting problems and solutions that I have come accross. Problem: In a web based system how to you prevent multiple updates to the same record by different users seeing potentially different data. This is a play on the old airline reservation problem you find in older computer science text books. If  there is one ...
Newark , US
8:08 pm
72°F
Broken clouds
High: 74°F
Low: 67°F
Wind: 3 mph