title: Unable to access controller data in codeigniter views
body: <p>I use the following code in my controller. But the data['msg'] is not being passed to the view file.</p>
  
  <p>Code:</p>
  
  <pre><code>class Operator{
  
  
  public function view ($page)
  {
      if ( ! file_exists('application/views/pages/'.$page.'.php'))
      {
          // Whoops, we don't have a page for that!
          show_404();
      }
  
      $data['title'] = $this-&gt;getTitle($page); 
      $this-&gt;load-&gt;view('templates/header', $data);
      $this-&gt;load-&gt;view('pages/'.$page, $data);
      $this-&gt;load-&gt;view('templates/footer', $data);
  
  }
  public function create_company()
  {
          // some code
      $data['msg1']='my mesg';
      redirect('operator/view/operator_success','refresh');
  }
  };
  </code></pre>
  
  <p>When operator_success(view page) is loaded it show error message: variable '$msg1' not defined.</p>