title: Form input values not held in session
body: <p>I have this codeigniter project am working on. Am displaying some set of questions and I want to use pagination to display the questions in batches. Everything is working fine when first loaded (I mean on the first page) but when I navigate say to the next page, it fail to work. So I realize that the form input values are not held on the subsequent pages, so I decided to use session to hold these form values but it not still been held. My Controller:</p>
  
  <pre><code>public function displayQuestions()
  {
      $sessData = [
          'classLevel' =&gt; $this-&gt;input-&gt;post('class_level'),
          'subject'   =&gt; $this-&gt;input-&gt;post('subject')
      ];
  
      $this-&gt;session-&gt;set_userdata($sessData);
  
      $config = array();
  
      $page = (($this-&gt;uri-&gt;segment(3)) ? $this-&gt;uri-&gt;segment(3) : 0);
  
      $config["base_url"]     = base_url().'questions/displayQuestions';
      $config["total_rows"]   = 20;
      $config["per_page"]     = 5;
      $config["uri_segment"]  = 3;
  
      $this-&gt;pagination-&gt;initialize($config);
      $data["links"] = $this-&gt;pagination-&gt;create_links();
  
      // print_r($this-&gt;session-&gt;classLevel); exit;
  
      $data['questions'] = $this-&gt;questions_model-&gt;selectQuestions($this-&gt;session-&gt;classLevel, $this-&gt;session-&gt;subject, $config["per_page"], $page);
  
      // $this-&gt;load-&gt;view('layouts/header');
      $this-&gt;load-&gt;view('users/questions', $data);
      // $this-&gt;load-&gt;view('layouts/sidebar');
      // $this-&gt;load-&gt;view('layouts/footer');
  }
  </code></pre>
  
  <p>Note: Am using the form input values to query the database to display the questions. My Model:</p>
  
  <pre><code>public function selectQuestions($classLevel, $subject, $limit, $start)
  {
      $questions = $this-&gt;db-&gt;where('class_level', $classLevel)
                      -&gt;where('subj_code', $subject)
                      // -&gt;order_by('id', 'RANDOM')
                      -&gt;limit($limit, $start)
                      -&gt;get('questions');
      // $questions = $this-&gt;db-&gt;limit($limit, $start)
      //              -&gt;get('questions');
  
      if ($questions-&gt;num_rows() &gt; 0) {
          return $questions-&gt;result_array();
          // print_r($questions-&gt;result_array());
      }
  
      return false;
  }
  </code></pre>