Hello,
I am working on a team for a class project where we are building a website (with PHP and MySQL) that will allow a user to book a meeting room (inside of a community center). The center houses four meeting rooms. A user has to create an account to be able to login and then reserve a room. They need to be able to delete and modify a reservation. Additionally, administrators have their own account on the website and can see and control all reservations.
We have created three database tables (using MySQL): reservation, rooms, users. These are the columns for all of the tables
Reservation: resid (Primary Key), roomid (Foreign Key), userid (Foreign Key), date, start_time, end_time, participants (number of people)
Rooms: roomid (Primary Key), mincapacity, maxcapacity
Users: userid (Primary Key), firstname, lastname, email, password, role (tracks if they are a user or an administrator)
We are now trying to figure out how to display reservations that have already been booked (using PHP). Our team has decided that a user can only reserve a room between the hours of 8:00 AM and 5:00 PM. Each reservation will be for 30 minutes at a time. How can we remove a time as an option (example: 9:00 AM- 9:30 AM) if it has already been booked?
Thank you in advance for any suggestions. I would greatly appreciate it.