title: How to Get Data Dropdown From Static Dropdown Codeigniter
body: <p>How to Get Data by id or other value From Static Dropdown?
  This My View  :</p>
  
  <pre><code>        &lt;select name="status" id="status" class="form-control"&gt;
              &lt;option selected="selected" value="1"&gt;ACTIVE&lt;/option&gt;
              &lt;option value="2"&gt;INACTIVE&lt;/option&gt;
          &lt;/select&gt;
  
          &lt;!--- GET DATA FROM DB WHERE STATUS DROPDOWN --&gt; 
          &lt;select name="result" id="result"&gt;
            &lt;option selected="selected" value=""&gt;ALL&lt;/option&gt;
          &lt;/select&gt;
  </code></pre>
  
  <p>My Model :</p>
  
  <pre><code>function get($status){
      $query = $this-&gt;db-&gt;get_where('people', array('status' =&gt; $status));
      return $query;
  }
  </code></pre>
  
  <p>My Controller :</p>
  
  <pre><code>function getresult(){
      $status= $this-&gt;input-&gt;post('status',TRUE);
      $data = $this-&gt;people_model-&gt;get($status)-&gt;result();
      echo json_encode($data);
  }
  </code></pre>
  
  <p>and My Ajax :
  <a href="https://i.stack.imgur.com/XX6pz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XX6pz.png" alt="enter image description here"></a></p>
  
  <p>I tried This but no Working Please Help</p>