如何在日历中选择一个日期,任何其他患者都无法使用php数据库选择该日期?

I am setting up a date and time calendar in the phpmyadmin database to select an appointment date by the patients but once one date is selected it can not be selected again. How can I do this in phphmyadmin and connect it with the database?

         <h5> Date: </h5>
           <input type="datetime-local"/><br>
         </form>
     </div>
     </div>

I would create a table with valid options. Let's say you can have patients between 9.00 am and 5.00 pm. A patient can book 30 mins appointments, therefore you need 30 mins intervals.

I'd call my table PossibleAppointments:

=================
=  id  =  time  =
=================
-   1  -  9:00  -
-----------------
-   2  -  9:30  -
-----------------
-      ...      -
-----------------
-   #  -  4:30  -
-----------------

Add another table called BookedAppointments, where you have an entry, such as:

================================
=  id  =      date    =  time  =
================================
-   #  -  2019-04-22  -    2   -
--------------------------------

Note that the column time would represent the id of one row of PossibleAppointments.

Now, whenever a patient wants to book an appointment, display a dropdown input and filter out already booked appointments based on your tables.