I want to create a user registration form for a meeting with several time slots. One time slot could only allow for 4 users. Ideally as soon as the time slot is full with 4 users, users wouldn't see the time slot as one of the choices when they register.
So I created two tables: timeSlot table and user table
timeSlot table: timeslot ID, timeslot description, and a control for number of users.
User table: userID, userName, timeslotID
The registration form itself contains two fields, user name, and time slot which is dynamically populated from the TimeSlot table when control < 4.
My question is: how does the form update the form timeslot table and user table at the same time? Now when the form is sent, the user table is updated(User name and timeslotID). I also want the control to be increased by 1 at the same time.
Any advice would be appreciated!