title: Dropdown select onChange redirect to url with a parameter in CodeIgniter
body: <p>How I would access this url <code>index.php/backend/categories/get_categories/$id</code> within a <code>&lt;select&gt;</code> dropdown onChange ?</p>
  
  <p>I mean, if I will go to <code>index.php/backend/categories/get_categories/1</code>, it will output a table with all categories under <code>component id 1</code>.</p>
  
  <p>What I want, is once i select an option from a dropdown list, i want it to submit and redirect to the same url, but with a specific ID from <code>&lt;option val="$id"&gt;</code> ?</p>
  
  <p>To generate a dropdown list with CodeIgniter FORM helper:</p>
  
  <pre><code>&lt;?php
      echo form_open('backend/categories/get_categories');
      $selectComponentData = array(0 =&gt; '-- '.lang('SELECT_COMPONENTS').' --');
      $selectComponentJs = 'onChange="this.form.submit()" id="selectCatsByComponent"';
  
      foreach($selectComponents as $option){
          $selectComponentData[$option-&gt;id] = $option-&gt;name;
      }
      echo form_dropdown('selectCatsByComponent', $selectComponentData, 0, $selectComponentJs);
      echo form_close();
  ?&gt;
  </code></pre>
  
  <p>And output HTML is:</p>
  
  <pre><code>&lt;form accept-charset="utf-8" method="post" action="http://127.0.0.1/backend/web/index.php/backend/categories/get_categories"&gt;
      &lt;select id="selectCatsByComponent" onchange="this.form.submit()" name="selectCatsByComponent"&gt;
          &lt;option selected="selected" value="0"&gt;-- Choose a component --&lt;/option&gt;
          &lt;option value="1"&gt;E-commerce&lt;/option&gt;
          &lt;option value="2"&gt;Content&lt;/option&gt;
      &lt;/select&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>How to make it possible ?</p>