title: pagination not working unsolved error
body: <p>hi everyone i am trying to build a pagination function in a web project i fallowed the user guide on codeigniter and a tutorial on net tuts here is the link <code>http://net.tutsplus.com/tutorials/php/codeigniter-from-scratch-day-7-pagination/</code>
  but i keep getting these tow errors:</p>
  
  <pre><code>A PHP Error was encountered
  
  Severity: Notice
  
  Message: Undefined property: CI_Loader::$pagination
  
  Filename: views/result_view.php
  
  Line Number: 41
  </code></pre>
  
  <p>and</p>
  
  <pre><code> Fatal error: Call to a member function create_links() on a non-object in C
  </code></pre>
  
  <p>cant figure these errors out where are they coming from and how can i fix them can some one help me here is my cmv :</p>
  
  <p><strong>controller</strong></p>
  
  <pre><code>&lt;?php
  
  class Result_controller extends CI_Controller{
  
      function getall(){
  
          $this-&gt;load-&gt;model('result_model');
          $data['query'] = $this-&gt;result_model-&gt;result_getall();
         // print_r($data['query']); die();
          $this-&gt;load-&gt;view('result_view', $data);
  
          }
  
          function pagination()
          {
  
              $this-&gt;load-&gt;library('pagination');
  
              $config['base_url'] = 'result_controller/pagination';
          $config['total_rows'] = $this-&gt;db-&gt;get('data')-&gt;num_rows();
          $config['per_page'] = 5;
          $config['num_links'] = 3;
          $config['full_tag_open'] = '&lt;div id="pagination"&gt;';
          $config['full_tag_close'] = '&lt;/div&gt;';
  
          $this-&gt;pagination-&gt;initialize($config);
  
          $data['records'] = $this-&gt;db-&gt;get('data', $config['per_page'], $this-&gt;uri-&gt;segment(3));
  
          $this-&gt;load-&gt;view('result_view', $data);
  
  
  
  
          }
  </code></pre>
  
  <p><strong>view</strong></p>
  
  <p>    </p>
  
  <pre><code> &lt;table border="1"&gt;
  
  
    &lt;tr&gt;
       &lt;th&gt;Name&lt;/th&gt;
       &lt;th&gt;Second Name&lt;/th&gt;
       &lt;th&gt;Phone&lt;/th&gt;
       &lt;th&gt;Email&lt;/th&gt;
       &lt;th&gt;Answer&lt;/th&gt;
       &lt;th&gt;Comment&lt;/th&gt;
   &lt;/tr&gt;
    &lt;?php foreach ($query as $row): ?&gt; 
   &lt;tr&gt;
  
       &lt;td&gt;&lt;?php echo $row-&gt;name; ?&gt;&lt;/td&gt;
       &lt;td&gt;&lt;?php echo $row-&gt;second_name; ?&gt;&lt;/td&gt;
       &lt;td&gt;&lt;?php echo $row-&gt;phone; ?&gt;&lt;/td&gt;
       &lt;td&gt;&lt;?php echo $row-&gt;email; ?&gt;&lt;/td&gt;
        &lt;td&gt; &lt;?php echo $row-&gt;answerA;?&gt;
        &lt;?php echo $row-&gt;answerB;?&gt;
        &lt;?php echo $row-&gt;answerC;?&gt;&lt;/td&gt;
       &lt;td&gt;&lt;?php echo $row-&gt;comment;?&gt;&lt;br&gt;&lt;/td&gt;
  
   &lt;/tr&gt;
  
        &lt;?php endforeach; ?&gt;
  
       &lt;/table&gt;  
       &lt;?php echo $this-&gt;pagination-&gt;create_links(); ?&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>model</strong></p>
  
  <pre><code>&lt;?php
  
  class Result_model extends CI_Model{
  
      function result_getall(){
  
           return $this-&gt;db-&gt;select('*')
                           -&gt;from('tblanswers, credentials')
                           -&gt;get()
                           -&gt;result_object();
  
      }
  
  
  
  }
  
  
  
  ?&gt;
  </code></pre>