title: Call to a member function run() on a non-object code igniter
body: <p>I am trying to design a user registration form using code igniter 2.1.0. I have used the following code in the regitration.php in controllers to add users.</p>
  
  <pre><code>class Registration extends CI_Controller
  {
  
      function __construct() {
          parent::__construct();
      }
  
  
      function index()
      {
          $data['main_content'] = 'registration';
  
          // Checks to see if form validation rules were met an executed properly.  If not, will return with registration form.
          if ($this-&gt;form_validation-&gt;run('registration') === FALSE) 
          {
              $data ['title'] = 'Registration';
              $this-&gt;load-&gt;view('include/template', $data);
          }
  
          // If validation passes, information will be passed along to the MODEL to be processed and the account will be created.
          else 
          {
              $this-&gt;load-&gt;model('registration_model');
              $this-&gt;registration_model-&gt;addUser();
  
              $this-&gt;session-&gt;set_flashdata('success', 'Your account has been successfully created');
              redirect(uri_string());
          }
      }
  }
  </code></pre>
  
  <p>But it showed me an error of <code>Call to a member function run() on a non-object</code>. How do i correct that?</p>