title: how to pass selected option id value to codeigniter controller
body: <p>i want to pass selected option value in id to codeigniter controller.</p>
  
  <pre><code>&lt;p&gt;
          &lt;select id="quantity" name="quantity" tabindex="2" onchange="calculate(this)" required autofocus&gt;
              &lt;option value=""&gt;Choose Your Quantity&lt;/option&gt;
              &lt;?php
                  if($prodqty)
                  {
                      foreach($prodqty as $qty)
                      {
                          for($i = $qty-&gt;quantity_from; $i &lt;= $qty-&gt;quantity_to; $i++)
                          {   
              ?&gt;
              &lt;option value="&lt;?=$i?&gt;" id="&lt;?=$qty-&gt;discount?&gt;"&gt;&lt;?=$i?&gt;&lt;/option&gt;
              &lt;?php } } } ?&gt;
          &lt;/select&gt;
        &lt;/p&gt;
  </code></pre>
  
  <p>i am already getter selected option value, now i want to get id value also i.e. id="discount?>"</p>
  
  <pre><code>function add_cart_prod()
  {
      if(isset($_POST['submit']))
      {
  </code></pre>
  
  <p>this is controller where i want to get id value</p>