title: OOP public variable problem
body: <p>Can someone please help for some reason i can echo and set the file and department variables in my export function but when i try to call them in exportdata they are null.</p>
  
  <pre><code>Class customersController Extends baseController {
      public $file;
      public $department;
  
  
      public function export() {
          $this-&gt;registry-&gt;template-&gt;title = 'Ainsworthstudio - Export Customer Info';
  
          $this-&gt;registry-&gt;model-&gt;createModel('db', 'db');
          $this-&gt;registry-&gt;model-&gt;createModel('customers', 'customers');
          $this-&gt;registry-&gt;model-&gt;getModel('db')-&gt;addConnection("localhost", "sdgsdg", "sdg0", "sdg");
          $data = $this-&gt;registry-&gt;model-&gt;getModel('customers')-&gt;getDepartments();
  
          while(list($k, $v)=each($data))
              $$k = $v;
  
          $this-&gt;registry-&gt;template-&gt;departments = $data;
          $this-&gt;registry-&gt;template-&gt;show('customers_export');
      }
  
      public function exportcheck() {
          if(!empty($_POST['filename'])) {
              $this-&gt;file =  $_POST['filename'];
              $this-&gt;department =  $_POST['depart'];
  
              echo "&lt;div class='error_message'&gt;Exported Successfully&lt;/div&gt;";
  
              echo $this-&gt;file;
              echo $this-&gt;department;
              echo 'success';
          } else {
              echo "&lt;div class='error_message'&gt;Wrong Username or Password&lt;/div&gt;";
              exit();
          }
      }
  
      public function exportdata() {
          return $this-&gt;file;
          return $this-&gt;department;
  
          echo $this-&gt;department;
      }
  }
  </code></pre>