title: Codeigniter - Grab value from dropdown pass to controller
body: <p>I am trying to pass a value from a form which has 3 options so when the user clicks on any of the options it should pass the value to the controller. </p>
  
  <p>I am thinking maybe i can have something like `onChange="selectedValue". I tried to grab the post from the view but it did not work.  </p>
  
  <p>Any help would be appreciated </p>
  
  <p>View</p>
  
  <pre><code>            &lt;label&gt;Reports&lt;/label&gt;
              &lt;form&gt;
              &lt;select NAME="hours"&gt;
                &lt;option value="24"&gt;24&lt;/option&gt;
                &lt;option value="12"&gt;12&lt;/option&gt;
                &lt;option value="1"&gt;1&lt;/option&gt;
  
              &lt;/select&gt;
              &lt;/form&gt;
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>public function about()
  {
      $search = $this-&gt;input-&gt;post('hours');
  
      echo $search;
  
      $this-&gt;load-&gt;view("about");
  }
  </code></pre>