title: modal bootstrap form edit in codeigniter
body: <p>I am newbie in  CodeIgniter. I have a table where data is showing. In each row there is an edit button. When the edit button is clicked, a modal popup will pop up and then you are able to edit it. What my problem is, is that I don't know how to attach a link of my controller.</p>
  
  <p>my view:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;a href='&lt;?php echo site_url();?&gt;input_activity/edit/&lt;?php echo $row-&gt;activity_detail_id;?&gt;' class="btn btn-outline btn-circle btn-sm purple" data-toggle="modal" &gt;
  &lt;i class="fa fa-edit"&gt;&lt;/i&gt; Edit &lt;/a&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>my controller:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>public function edit()
  {
   $id=$this-&gt;uri-&gt;segment(3);
   $data=array(
   'content' =&gt;'activity/v_updateactivity');
   $this-&gt;load-&gt;view('layout/wrapper',$data);
  }
   </code></pre>
  </div>
  </div>
  </p>
  
  <p>form edit:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!-- begin pop update activity --&gt;
  &lt;div class="modal fade left" id=""&gt; 
  &lt;div class="modal-dialog"&gt; 
  &lt;div class="modal-content"&gt; 
  &lt;div class="modal-header"&gt; 
  &lt;h3 class="pull-left no-margin"&gt;Edit Activity&lt;/h3&gt;
  &lt;button type="button" class="close" data-dismiss="modal" title="Close"&gt;&lt;span class="glyphicon glyphicon-remove"&gt;&lt;/span&gt;
  &lt;/button&gt; 
  &lt;/div&gt; 
  &lt;div class="modal-body"&gt;
  &lt;form class="form-horizontal" role="form" method="post" action="&lt;?php echo base_url(); ?&gt;input_activity/update"&gt; 
  &lt;div class="form-group"&gt; 
  &lt;label for="activity" class="col-sm-3 control-label"&gt;activity: &lt;/label&gt; 
  &lt;div class="col-sm-9"&gt; 
  &lt;textarea class="form-control" rows="3" name="activity_name"  required&gt;&lt;?php echo $detail[0]-&gt;name;?&gt;&lt;/textarea&gt;
      
  &lt;button type="submit" class="btn green"&gt;
  &lt;i class="fa fa-save"&gt;&lt;/i&gt; Update&lt;/button&gt;
  .........</code></pre>
  </div>
  </div>
  </p>