title: Message: Undefined property: CI_Loader::$table
body: <p>this is my controller ..</p>
  
  <pre><code>class Customer extends CI_controller
  {
  
  public function __construct()
  {
      parent::__construct();
      $this-&gt;load-&gt;model('Customer_model');
  }
  public function create()
  {
  
          $this-&gt;load-&gt;helper('form');
          $this-&gt;load-&gt;library('form_validation');
      $this-&gt;form_validation-&gt;set_rules('name', 'Name', 'required');
      $this-&gt;form_validation-&gt;set_rules('address', 'Address', 'required');
      $this-&gt;form_validation-&gt;set_rules('office_phone', 'Phonenumber', 'required');
      $this-&gt;form_validation-&gt;set_rules('fax', 'Faxno.', 'required');
      $this-&gt;form_validation-&gt;set_rules('email', 'Mailaddress', 'required');
  
      $data = array(
          'name' =&gt; $this-&gt;input-&gt;post('name'),
  
          'address' =&gt; $this-&gt;input-&gt;post('address'),
  
          'phoneno' =&gt; $this-&gt;input-&gt;post('office_phone'),
  
          'fax' =&gt; $this-&gt;input-&gt;post('fax'),
  
          'email' =&gt; $this-&gt;input-&gt;post('email')
      );
  
  
      if ($this-&gt;form_validation-&gt;run() === FALSE)
      {
          $this-&gt;load-&gt;helper('url');
          $this-&gt;load-&gt;view('templates/header');  
          $this-&gt;load-&gt;view('master/customer',$data);
      }
      else
      {
  
          $this-&gt;Customer_model-&gt;register($data);
          $this-&gt;load-&gt;library('session');
         //$this-&gt;session-&gt;set_flashdata('message', 'New Contact has been added');
               //redirect(current_url());
          $this-&gt;load-&gt;helper('url');
          $this-&gt;load-&gt;view('templates/header');
          $this-&gt;load-&gt;view('templates/success');
      }
      $this-&gt;load-&gt;library('pagination');
       $this-&gt;load-&gt;library('table');
  
  
  
        // Config setup
      $config['base_url'] = base_url().'/customer/';
      $config['total_rows'] = 20;
      $config['per_page'] = 10;
      // I added this extra one to control the number of links to show up at each page.
      $config['num_links'] = 5;
      // Initialize
      $this-&gt;pagination-&gt;initialize($config);
  
  
        $data1 = $this-&gt;db-&gt;get('registration');
        $header = array('Name', 'Address', 'phoneno','fax','email');
         $this-&gt;table-&gt;set_heading($header);
         $this-&gt;load-&gt;view('master/customer',$data1);
         }
  }
  </code></pre>
  
  <p>This is my view part..</p>
  
  <pre><code>&lt;div id='results'&gt;
  &lt;?php  echo $this-&gt;table-&gt;generate($data1); ?&gt;
  &lt;?php echo $this-&gt;pagination-&gt;create_links(); ?&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p></p>
  
  <p>while running iam getting an error message like this</p>
  
  <p>A PHP Error was encountered</p>
  
  <blockquote>
    <p>Severity: Notice</p>
    
    <p>Message: Undefined property: CI_Loader::$table</p>
    
    <p>Filename: master/Customer.php</p>
    
    <p>Line Number: 44</p>
    
    <p>Fatal error: Call to a member function generate() on a non-object in
    C:\xampp\htdocs\CodeIgniter_2.1.3\application\views\master\Customer.php
    on line 44</p>
  </blockquote>
  
  <p>Any body please tell me what is the problem.i am new to codeignator..</p>