title: how to disable an option if it's already selected (PHP - MYSQL)
body: <p>i am working on a dental booking website. it's a school project and i am almost done. but i have 1 major problem and would really appreciate your help.. i have this booking page wherein the client can set date, time and service. on my time, i have set a dropdown for available hours. i would want those hours to be available per day. i was wondering if it is possible to disable an option if it is already booked for that day. i only have these..</p>
  
  <p>i have a table called appointments. columns are ID, userID, reservationDateTime, schedDate, schedTime, service..</p>
  
  <hr>
  
  <pre><code>    &lt;?php
      $time = array('8:00 AM', '9:00 AM', '10:00 AM', '11:00 AM','1:00 PM','2:00 PM','3:00 PM','4:00 PM',);
      ?&gt;
  
      &lt;p&gt;
  &lt;label&gt;Time&lt;/label&gt;&lt;br&gt;
      &lt;select name="appTime"&gt;
      &lt;option&gt;Select Time&lt;/option&gt;
      &lt;?php
      foreach($time as $value){
      echo "&lt;option&gt;$value&lt;/option&gt;";}
      ?&gt;
  
      &lt;/select&gt;
      &lt;/p&gt;
      &lt;?php
      unset($time)
      ?&gt;
  </code></pre>