title: radio buttons in php to select an apointment slot
body: <p>I am looking for a solution so that the user can select an appointment slot. I am trying to add a radio button, but not sure how to go about it.</p>
  
  <pre><code>&lt;?php
     $servername = "localhost";
     $username = "root";
     $password = "";
     $dbname = "hairdressingapointments";
  
     // Create connection
     $conn = new mysqli($servername, $username, $password, $dbname);
     // Check connection
     if ($conn-&gt;connect_error) {
        die("Connection failed: " . $conn-&gt;connect_error);
     } 
  
     $sql = "SELECT `ApointmentDate`, `ApointmentTime` FROM `apointments` 
      WHERE  `ApointmentDate` between curdate() and curdate()+ interval '50' day 
      &amp;&amp; quantity=1 &amp;&amp; staffID=901";
     $result = $conn-&gt;query($sql);
  
     if ($result-&gt;num_rows &gt; 0) {
     // output data of each row
        while($row = $result-&gt;fetch_assoc()) {
           echo " Apointment Date: " . $row["ApointmentDate"]. " Appointment Time: " 
          . $row["ApointmentTime"]. "&lt;br&gt;";
         }
     } else {
        echo "0 results";
     }
     $conn-&gt;close();
  ?&gt;
  </code></pre>