title: Pass a current $row value to Bootstrap Modal
body: <p>Table:</p>
  
  <pre><code>&lt;table class="table table-bordered"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;Works At&lt;/th&gt;
                  &lt;th&gt;First Name&lt;/th&gt;
                  &lt;th&gt;Middle Initial&lt;/th&gt;
                  &lt;th&gt;Last Name&lt;/th&gt;
                  &lt;th&gt;Start Date&lt;/th&gt;
                  &lt;th&gt;SSN#&lt;/th&gt;
                  &lt;th&gt;Modify&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;?php
              $query = "SELECT * FROM employees";
  
              $stmt = $db-&gt;prepare($query);
              $stmt-&gt;execute();
  
              foreach ($stmt as $row): ?&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;?php echo $row['rest_id_employees']; ?&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;?php echo $row['fname']; ?&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;?php echo $row['minit']; ?&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;?php echo $row['lname']; ?&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;?php echo $row['start_date']; ?&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;?php echo $row['ssn']; ?&gt;&lt;/td&gt;
                      &lt;td style="text-align: center"&gt;
                          &lt;div class="btn-toolbar"&gt;
                              &lt;div class="btn-group"&gt;
                                  &lt;a class="btn btn-danger" href="&lt;?php echo $_SERVER['PHP_SELF'].'?ssn='.urlencode($row['ssn']); ?&gt;#delModal" data-toggle="modal"&gt;&lt;i class="icon-trash icon-white"&gt;&lt;/i&gt; Delete&lt;/a&gt;
                                  &lt;a class="btn btn-warning" href="#editModal"&gt;&lt;i class="icon-wrench icon-white"&gt;&lt;/i&gt; Edit&lt;/a&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
          &lt;?php endforeach; ?&gt;
      &lt;/table&gt;
  </code></pre>
  
  <p>My goal is to pass the value of $row['ssn'] into my #delModal. I assume the problem lies within:</p>
  
  <pre><code>&lt;a class="btn btn-danger" href="&lt;?php echo $_SERVER['PHP_SELF'].'?ssn='.urlencode($row['ssn']); ?&gt;#delModal" data-toggle="modal"&gt;&lt;i class="icon-trash icon-white"&gt;&lt;/i&gt; Delete&lt;/a&gt;
  </code></pre>
  
  <p>It is my understanding that with the above syntax I should be able to use <code>$_GET['ssn']</code> inside the Bootstrap Modal to pull the value, but when I <code>var_dump($ssn)</code> the value only <code>NULL</code> is printed.</p>
  
  <p>Here is the Modal:</p>
  
  <pre><code>&lt;div class="modal hide" id="delModal" aria-hidden="true"&gt;
          &lt;div class="modal-header"&gt;
              &lt;h3 style="color: red"&gt;WARNING&lt;/h3&gt;
          &lt;/div&gt;
          &lt;div class="modal-body"&gt;
              &lt;?php
                  $ssn = $_GET['ssn'];
                  var_dump($ssn);
              ?&gt;
              &lt;h4&gt;You are about to delete --- from your Employee database.&lt;/h4&gt;
              &lt;p&gt;An employee cannot be recoverd once they have been deleted. They can be added to the system again, but
                  all data about the employee will be lost if you delete them. Are you sure you mean to delete this
                  employee from the database?&lt;/p&gt;
          &lt;/div&gt;
          &lt;div class="modal-footer"&gt;
              &lt;button class="btn" data-dismiss="modal" aria-hidden="true"&gt;Cancel&lt;/button&gt;
              &lt;a class="btn btn-danger" href="deleteemployee.php?ssn=&lt;?php echo urlencode($ssn); ?&gt;"&gt;&lt;i class="icon-trash icon-white"&gt;&lt;/i&gt; Delete&lt;/a&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>The overall purpose of this implementation is to use the Modal as a means to not accidentally delete an employee by prompting the user with a warning. I cannot just use <code>$row</code> within the Modal as it will pull the last row every time, and I'm sure there's a better way of achieving what I'm trying to do than what I'm trying to do here, but I'm not sure what that way is.</p>