title: How to edit data from database in Codeigniter using bootstrap modal?
body: <p>I'm new to codeigniter and I don't how to use this.. please help.</p>
  
  <p>here is my view file (manufacturers.php)</p>
  
  <pre><code>&lt;thead&gt;
              &lt;tr&gt;
  
                  &lt;th&gt;Name&lt;/th&gt;
                  &lt;th&gt;&lt;/th&gt; 
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              &lt;?php echo $this-&gt;session-&gt;flashdata('message'); ?&gt;
              &lt;?php $offset = $this-&gt;uri-&gt;segment(3, 0) + 1; ?&gt;
              &lt;?php foreach ($query-&gt;result() as $row); ?&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;?php echo $row-&gt;manufacturer_name; ?&gt;&lt;/td&gt;
                      &lt;th&gt;
  
                      &lt;a class="btn btn-warning btn-xs" data-toggle="modal" data-target=".bs-editmanuf-modal-lg"&gt;&lt;i class="fa fa-edit"&gt;&lt;/i&gt;&lt;/a&gt;
  
                          &lt;?php $this-&gt;load-&gt;view('modals/editmanufacturer');?&gt;
  
                  &lt;/tr&gt;
  
          &lt;/tbody&gt;
  </code></pre>
  
  <p>This is my modal for edit (editmanufacturer.php)</p>
  
  <pre><code> &lt;div class="form-group"&gt;
  &lt;label for="manufacturer_id" class="col-sm-2 control-label"&gt;ID :&lt;/label&gt;
  &lt;div class="col-sm-3"&gt;
  &lt;input type="text" class="form-control" id="manufacturer_id" name="manufacturer_id" placeholder="manufacturer_id"&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="form-group"&gt;
  &lt;label for="manufacturer_name" class="col-sm-2 control-label"&gt;Name :&lt;/label&gt;
  &lt;div class="col-sm-3"&gt;
  &lt;input type="text" class="form-control" id="manufacturer_name" placeholder="manufacturer_name" name="manufacturer_name"&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;br&gt;
  
  
  &lt;input type="submit" value="Update" class="btn btn-primary" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I don't know what to put on my controller and model... please help!!!</p>