title: How to get a loaded data from view back to controller to be reused on another function?
body: <p>I am studying CRUDS in codeigniter and have been successful in displaying data from a database and inserting data in the database. I am not sure where I went wrong here but I need to reuse the ID I loaded in the view page to edit it in the database, I loaded the data using the code below, (its part of a foreach loop), i was ask to edit the question</p>
  
  <pre><code>&lt;div class="gbItem"&gt;
                      &lt;a href="#"&gt;&lt;/a&gt;
  &lt;a href="#" class="pull-left"&gt;
                        &lt;img alt="image" class="img-circle" src="&lt;?php echo base_url(); ?&gt;/public/img/profile.jpg"&gt;
                      &lt;/a&gt;
                      &lt;div class="gbItemBody clearfix"&gt;
                        &lt;input type="hidden" name="user_id" value="&lt;?php echo $value-&gt;user_id  ;?&gt;"&gt;
                        &lt;div class="pull-left"&gt;
                          &lt;i class="fa fa-circle gbDeactivate"&gt;&lt;/i&gt;
                          &lt;a&gt;&lt;strong&gt;
                            &lt;?php echo $value-&gt;user_firstname;?&gt;
                            &lt;?php echo $value-&gt;user_lastname;?&gt;
                          &lt;/strong&gt;&lt;/a&gt;
                          &lt;br&gt;                            
                            &lt;strong&gt;
                              Campaign 1
                            &lt;/strong&gt;                            
                        &lt;/div&gt;  
                        &lt;div class="pull-right"&gt;
                          &lt;span class="gbDeactivate pull-right"&gt;Idle&lt;/span&gt;&lt;br&gt;
                          &lt;span class="pull-right"&gt;Skill Level 4&lt;/span&gt;                           
                        &lt;/div&gt;              
                      &lt;/div&gt;
                  &lt;/div&gt;
  </code></pre>
  
  <p>I need this back in the controller to be used in a function named</p>
  
  <pre><code>public function update()
  {
  $user['user_name'] = $this-&gt;users_model-&gt;get_by_id("i want it here");
  //codes here
  }
  </code></pre>
  
  <p>Can anyone help me please?</p>