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
11:20 pm
68°F
Scattered clouds
High: 69°F
Low: 65°F
Wind: 8 mph