title: How to get selected value from select list in PHP?
body: <p>I want to get selected value from form to a controller function, 
  Here is my code</p>
  
  <pre><code>&lt;form action='examplefunction'     method='POST'&gt;
  
  &lt;select name='chapter'&gt;
  &lt;option value='Select1'&gt;Select1   
  &lt;option value='Select2'&gt;Select2 
  &lt;option value='Select3'&gt;Select3 
  &lt;option value='Select4'&gt;Select4 
  &lt;option value='Select5'&gt;Select5 
  &lt;/select&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Controller function</p>
  
  <pre><code>public function examplefunction()
  {
   echo $_POST['chapter'];
  }
  </code></pre>
  
  <p>If I select <code>Select3</code> &amp; submit, it shows error in this function saying that "Undefined index: chapter". How can I get this value in controller function?</p>