title: Get a row from table in view on modal bootstrap using codeigniter
body: <p>I am developing a CI application. My problem is I want to make a confirmation window in a modal that viewing data in a row from a table in view.</p>
  
  <p>I have a view like this </p>
  
  <p>PHP</p>
  
  <pre><code>&lt;tbody&gt;
   &lt;?php
   $no = 1;
   foreach ($data_request as $data) {
   ?&gt;
  
    &lt;tr&gt;
        &lt;td class="sorting1"&gt;&lt;?php echo $no++ . ". "; ?&gt; &lt;/td&gt;                                            
        &lt;td class="sorting1"&gt;&lt;?php echo $data['id_request']; ?&gt; &lt;/td&gt;
        &lt;td class="center"&gt;&lt;?php echo "$name"; ?&gt;&lt;/td&gt;
        &lt;td class="center"&gt;&lt;?php echo date("d-m-Y, H:i ", strtotime($data['start_time'])); ?&gt; &lt;/td&gt;
        &lt;td class="center"&gt;&lt;?php echo $data['complaint']; ?&gt;&lt;/td&gt;                                            
        &lt;td class="center"&gt;
           &lt;span class="label label-warning"&gt;&lt;?php echo $data['status_request']; ?&gt;&lt;/span&gt;
        &lt;/td&gt; 
  
         &lt;td class="center"&gt;&lt;?php
             echo date("d-m-Y, H:i ", strtotime($data['closing_time']));
           ?&gt; &lt;/td&gt;                                            
  
        &lt;td  class="right"&gt;
             &lt;a class="btn btn-danger" href="#"&gt;
                 &lt;i class="halflings-icon white trash"&gt;&lt;/i&gt; Close
             &lt;/a&gt;
  
             &lt;a class="btn btn-success btn-setting" href="#"&gt;
                 &lt;i class="halflings-icon pencil"&gt;&lt;/i&gt; Print
              &lt;/a&gt;
        /td&gt;
    &lt;/tr&gt;
  
           &lt;?php } ?&gt;
      &lt;/tbody&gt;
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>  &lt;div class="modal hide fade" id="myModal"&gt;
          &lt;div class="modal-header"&gt;
              &lt;button type="button" class="close" data-dismiss="modal"&gt;×&lt;/button&gt;
              &lt;h3&gt;Your Request&lt;/h3&gt;
          &lt;/div&gt;
          &lt;div class="modal-body"&gt;
              &lt;p&gt;This is preview :&lt;/p&gt;
  
          &lt;/div&gt;
          &lt;div class="modal-footer"&gt;
  
              &lt;a href="control_member" class="btn btn-primary"&gt;Print&lt;/a&gt;
              &lt;a href="#" class="btn" data-dismiss="modal"&gt;Back&lt;/a&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>When users click the button print, the modal will be showing the row that was selected like just a preview ... ?</p>
  
  <p>What I am supposed to do because the table is built with data from SQL table?</p>
  
  <p>I guess I have solution like this :</p>
  
  <p>IN MODEL :</p>
  
  <pre><code>SELECT * FROM tabel where id_request ...
  </code></pre>
  
  <p>OR should I just edit the view of the bootstrap modal?</p>
  
  <p>Thanks... </p>