Table: booking
Fields: email, booking_accepted, booking_flag, etc.
I've set up a my site so that users go to EDIT Page and simply enter there email and tick the booking_accepted field.
The record is then updated with "booking_flag" being set to 1.
Here's the problem.
User1 goes to Edit Page for record, and simply leaves the record open.
User2 goes to Edit Page for the same record, enters there email and checks the booking_accepted field. User2 clicks SAVE, the record is updated with User2's details and the "booking_flag" field is set to '1'
User1 comes back from there coffee break and enters there email and checks the booking_accepted field. User1 clicks Save. At this point the previously stored User2 details are overwritten by User1.
I would like to find a way, whilst the Edit page is open to check against the field "booking_flag" = 1.
If "booking_flag" = 1 then i can redirect to an error page.
I need this to be applied at the Edit Page: Before record updated Event.
Your help would be much appreciated.
Lisa