title: codeigniter - insert data by id on click on button
body: <p>I have a list of menus and when i click on menu shows a view with her details.
  that's the view(menus_detalhes_user):</p>
  
  <pre><code>&lt;p class="text-muted"&gt;&lt;?php echo $menus-&gt;nome?&gt;&lt;/p&gt;
                      &lt;p class="text-muted"&gt;&lt;?php echo $menus-&gt;preco?&gt;€&lt;/p&gt;
                      &lt;a href="carrinhof/&lt;?php echo $menus-&gt;id_menu?&gt;" class="btn btn-default btn-xl"&gt;Add&lt;/a&gt;
  </code></pre>
  
  <p>Now i need to add this menu to show in another view. I have that href, that 
  supposedly sends me to function "carrinhof" on controller, but it doesn't happen. That href sends me to another controller and another function. 
  Send me to the function that makes the select of all menus.</p>
  
  <p>Controller:</p>
  
  <pre><code>function carrinhof()
  { echo 'Hello World!'; echo die();
      $this-&gt;load-&gt;helper('url');
      $id = $this-&gt;uri-&gt;segment(3,0);
  
      if($id == 0)
      {
          $this-&gt;load-&gt;helper('url');
          redirect('controller/fmostra_menus_user');
      }
      else
      {
          $this-&gt;load-&gt;model('carrinho_model');
  
          $data['carrinho'] = $this-&gt;carrinho_model-&gt;getAllDisplayable_carr($id);
                      $this-&gt;load-&gt;library('form_validation');
  
  
          $this-&gt;load-&gt;view('carrinho_view',$data);
      }
  } 
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>function getAllDisplayable_carr()
   {
      $data['id_carrinho'] = $this-&gt;input-&gt;post('id_nome');
      $data['id_menu'] = $this-&gt;input-&gt;post('id_menu');
      $data['id_login'] = $this-&gt;input-&gt;post('id_login');
  
      $this-&gt;db-&gt;insert('carrinho',$data);
   }
  </code></pre>
  
  <p>I just want insert that menu on a table to show in another view, like an order that user makes and saves that menu in another area.
  Thank's</p>