如何通过表单将数据发布到同一个html页面中的某个表格单元格

I don't have experience to this.I have a college project and my main purpose is to get the value(in this example is the course) from database and post it to a certain table cell in the same page base on the time they choose.I also need my form to refresh each time so I can post another course each time. Any ideas?

   <?php  
        $conn = mysqli_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD,DB_DATABASE);  
        $query="SELECT * FROM `course`";
        $result1= mysqli_query($conn, $query);  
        $query="SELECT * FROM `Time`";  
        $result2= mysqli_query($conn, $query);
    ?>



     <html>
        <body>
        <form name="myform" action="">
        <div class="form-group">
                    <label for="Course">Add Course</label>
                    <select id="select1" class="form-control" name="favorite">
                <?php while ($row1=mysqli_fetch_array($result1)):; ?>
                        <option value="<?php echo $row['Course_ID']; ?>"><?php echo $row1['Name'];?></option>
                <?php endwhile;?>        
                    </select>
               </div>

        <div class="form-group">
                    <label for="Time">Add Course</label>
                    <select id="select2" class="form-control" name="favorite">
                <?php while ($row1=mysqli_fetch_array($result2)):; ?>
                        <option value="<?php echo $row['Time_ID']; ?>"><?php echo $row1['Time'];?></option>
    <?php endwhile;?>        
                    </select>
               </div>
<button type="submit" id="btn1" class="btn btn-primary">Submit</button>
        </form>

        <table class="table">
          <thead>
            <tr>
              <th scope="col">#</th>
              <th scope="col">Monday</th>
              <th scope="col">Tuesday</th>
              <th scope="col">Wednesday</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <th scope="row">09:00</th>
              <td>(For example, Post the Course here)</td>
              <td></td>
              <td></td>
            </tr>
          </tbody>
        </table>

        </body>
        </html>