title: codeigniter get data by selection of dropdown
body: <blockquote>
    <p>How to get data by selecting the drop-down in CodeIgniter.</p>
  </blockquote>
  
  <p>Below is my code it does not work. The below code is not working properly when I selecting an option in the drop down and when I submit page appearing empty. when click please help me to get data. I am doing it in CodeIgniter. I want to get data from the database . I think the code is perfect am new to CodeIgniter the below code is not working properly the page appearing empty when click please help me to get data. I am doing it in CodeIgniter. I want to get data from the database . I think the code is perfect am new to CodeIgniter.</p>
  
  <p><strong>view:</strong></p>
  
  <pre><code>&lt;?php echo form_open('super_admin/believers_controller/view_believerr/' , array('class' =&gt; 'form-horizontal validatable', 'enctype' =&gt; 'multipart/form-data') ); ?&gt;
  
  &lt;div class="form-group"&gt;
      &lt;label class="col-sm-3 control-label no-padding-right" for="form-field-1"&gt; District Id&lt;/label&gt;
  
      &lt;div class="col-sm-9"&gt;
          &lt;select name="report_type" &gt;
              &lt;option &gt;Select  Id&lt;/option&gt;
              &lt;option value="believers"&gt;Believers&lt;/option&gt;
              &lt;option value="staff"&gt;staff&lt;/option&gt;
              &lt;option value="staff"&gt;committe members&lt;/option&gt;
  
          &lt;/select&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="clearfix form-actions"&gt;
      &lt;div class="col-md-offset-3 col-md-9"&gt;
          &lt;input type="submit" name="Submit" class="btn btn-info" &gt;
  </code></pre>
  
  <p><strong>controller:</strong></p>
  
  <pre><code>&lt;?php
  function view_believerr()
  {
      $report_type = $this-&gt;input-&gt;get('report_type');
      if($report_type=='believers'){
          $this-&gt;load-&gt;model('believers/believers_model');
          $page_data['h']=$this-&gt;believers_model-&gt;view_believer();
          $page_data['page_name']  = 'believers/view_believer';
          $this-&gt;load-&gt;view('index', $page_data);
      }
  }
  ?&gt;
  </code></pre>
  
  <p><strong>model:</strong></p>
  
  <pre><code>&lt;?php
  function view_believer()
  {
      $query = $this-&gt;db-&gt;get('tbl_believers');
      return $query;
  }
  ?&gt;
  </code></pre>
  
  <p>I want to get data from database . I think the code is perfect am new to codeigniter the below code is not working properly the  page appearing empty when click please help me to get data. I am doing it in codeigniter. I want to get data from database . I think the code is perfect am new to codeignite</p>