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
6:43 am
50°F
Scattered clouds
High: 52°F
Low: 48°F
Wind: 13 mph