title: how to post loop value with bootsrap modal and form post?
body: <p>i'm trying to insert bootraps modal to form POST but doesn't work .
  whenever I tried with modal, the result from post is always wrong .
  for example, the result from my query in row one is abcde, row two is fghij. Without boostrap modal the result is right, but with bootsrap modal is always show only from row one ..</p>
  
  <p>here my working code without modal that working perfectly</p>
  
  <pre><code> &lt;?php $no=1; foreach ($result2 as $row) {
         if ($row-&gt;status_vld == 0){
         $valid = 'Belum Valid'; }
         else { 
         $valid = 'sudah valid';} 
  
               echo '&lt;tr&gt;';
               echo '&lt;td&gt;'.$no++.'&lt;/td&gt;';
  
               echo '&lt;td&gt;'.$row-&gt;nama_tabel.' ';
               echo 
  '&lt;form action="validasi_mahasiswa" method="POST" role="form" class="form-horizontal"&gt;
  &lt;div class="form-group"&gt;
      &lt;input type="hidden" class="form-control" id="valid" name="validasi" value='.$row-&gt;nama_tabel.'&gt;
    &lt;/div&gt;
    &lt;button type="submit" class="btn btn-primary"&gt;VALIDASI&lt;/button&gt;
  &lt;/form&gt;
               &lt;/td&gt;';
               echo '&lt;td&gt;'.$row-&gt;pt_upload.'&lt;/td&gt;';
               echo '&lt;td&gt;'.$row-&gt;id_pt.'&lt;/td&gt;';
                echo '&lt;td&gt;'.$row-&gt;tgl_upload.'&lt;/td&gt;';
                echo '&lt;td&gt;'.$valid.'&lt;/td&gt;';
                echo '&lt;/tr&gt;';
             }
              ?&gt;
  </code></pre>
  
  <p>and here with bootsrap modal that doesn't work</p>
  
  <pre><code>echo '
  
  &lt;form action="validasi_mahasiswa" method="POST" role="form" class="form-horizontal"&gt;
  
    &lt;input type="hidden" class="form-control" id="valid" name="validasi" value='.$row-&gt;nama_tabel.'&gt;
  
    &lt;button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal"&gt;Open Modal&lt;/button&gt;
  
    &lt;div class="modal fade" id="myModal" role="dialog"&gt;
  
      &lt;div class="modal-dialog"&gt;
  
        &lt;div class="modal-content"&gt;
  
          &lt;div class="modal-body"&gt;
  
  
          &lt;div class="form-group"&gt;
    &lt;button type="submit" class="btn btn-primary"&gt;VALIDASI&lt;/button&gt;
    &lt;/div&gt;
    &lt;/div&gt;
     &lt;/div&gt;
     &lt;/div&gt;
     &lt;/div&gt;
  
       &lt;/form&gt;
               &lt;/td&gt;';
  </code></pre>