title: How to pass a variable from view to controller in codeigniter
body: <p>I want to pass a language id for each link i click from my view to controller.
  My view code is </p>
  
  <pre><code>  &lt;?php foreach ($languages as $lang) { ?&gt;
       &lt;li&gt;
         &lt;a href="&lt;?php echo base_url(); ?&gt;home/box/&lt;?php echo $template_data['box_id']?&gt;/&lt;?php echo $lang['language_name']?&gt;"&gt;&lt;/a&gt;
       &lt;/li&gt;
     &lt;?php } ?&gt; 
  </code></pre>
  
  <p>My controller is</p>
  
  <pre><code>public function box($box_id=null, $language_name=null, $language_id=null) {
     /// my function code
          echo $box_id;
          echo $language_name;
          echo $language_id;
     $data['languages'] = $this-&gt;Home_model-&gt;getLanguages($box_id);
    }
  </code></pre>
  
  <p>The languages array contain the language id and language name</p>
  
  <p>i want the name to be in url but not the id </p>
  
  <p>The url looks like this </p>
  
  <pre><code>http://localhost/mediabox/home/box/12/en
  </code></pre>
  
  <p>if i send the language id in url it is then visible otherwise it is not visible in the controller.
  How can I get language id for each link in controller without sending it in url </p>
  
  <p>Thanks</p>