title: Update using modal and php
body: <p>I'm doing a CRUD operation using php and bootstrap only. I'm currently stuck at update because I cant seem to send the <code>$_GET['updateid']</code> to my modal.</p>
  
  <p>This is my href's, the <strong>delete</strong> <code>href</code> is working but the <strong>update</strong> is not.</p>
  
  <pre><code>&lt;a href="#myModal?updateid=&lt;?php echo $row['sched_id'];?&gt;" data-toggle="modal"  
                class="btn btn-warning" data-target="#myModal"&gt;Update&lt;/a&gt;
  &lt;a href="home.php?deleteid=&lt;?php echo $row['sched_id'];?&gt;" class="btn btn-danger"&gt;Delete&lt;/a&gt;
  </code></pre>
  
  <p>This php should take the <code>updateid</code> from the <code>href</code> and pass it to the updateStud() function</p>
  
  <pre><code>if(isset($_GET['updateid'])){
    $mupdate_id = $_GET['updateid'];
  
    if(isset($_POST['modal-submit'])){
  
      $msubj = $_POST['modalsubject'];
      $msect = $_POST['modalsection'];
      $mday = implode("", $_POST['modalday']);
      $mstrTime = $_POST['modalstarttime'];
      $mendTime = $_POST['modalendtime'];
  
      $auth_user-&gt;updateSchedule($msubj,$msect,$mday,$mstrTime,$mendTime,$mupdate_id);
      $schedRow = $auth_user-&gt;readSchedule();
    }
  }
  </code></pre>
  
  <p>this is my function update that takes all the data and executes the query</p>
  
  <pre><code>public function updateSchedule($msubj,$msect,$mday,$mstrTime,$mendTime,$mupdate_id){
          $stmt = $this-&gt;conn-&gt;prepare("UPDATE `schedule`   
              SET `subject_db` = :msubj,
              `section_db` = :msect,
              `sched_day` = :mday,
              `start_time` = :mstrTime,
               `end_time` = :mendTime
              WHERE `sched_id` = :mupdate_id ");
  
          $stmt-&gt;bindparam(":msubj", $msubj);
          $stmt-&gt;bindparam(":msect", $msect);
          $stmt-&gt;bindparam(":mday", $mday);
          $stmt-&gt;bindparam(":mstrTime", $mstrTime);
          $stmt-&gt;bindparam(":mendTime", $mendTime);
          $stmt-&gt;bindparam(":mupdate_id", $mupdate_id);
  
          $stmt-&gt;execute();
  
          return $stmt;
      }
  </code></pre>