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:45 am
66°F
Overcast clouds
High: 68°F
Low: 62°F
Wind: 15 mph