Hi, i want to create an application for book an appointment.
The admin enters a period (e.g. every 20 min; from 8pm to 10pm) and the user selects a time.
How would you solve this? Has someone an approach?
Ok. I try to explain it better.
Employees can book an appointment. An appointment is 20 minutes. The admin should be able to enter a free appointment at the application . E.g. 8.00, 8.20, 8.40, 9.00, (rest), 9.40, 10.00, 10.20, end.
Every day is differend.
The user can book one appointment and than the time is engaged.
So what can't you do in this exactly ? I don't see anything mysterious, simply adding aappointments with time and date in DB, and a status with E.g Time : 8.40 Date : 11/27/2015 Status : Not Taken (or Taken) User : Nullable and then listing all appointments with NOT TAKEN to users to choosen from and if taken we add user ID and change not taken to token .. Enough ? P.S. : System won't know when is saturday, sunday (weekend) so using a jquery datepicker that allows specific dates to be unusable would be good for you WITH of course a PHP verification as any user may hack the jquery (Do NEVER trust what is coming from client)
Thanks for support.
Which classes and models do i need? Do you think it is enough to create one class?
I think i need two db tables: one for the day and the event and one for the appointments.
Or is it better, to use one table with "date, event, time, status, name, phone, email" ?