Welcome Guest, Not a member yet? Register   Sign In
Variable from Controller not working in Views
#4

[eluser]xtremer360[/eluser]
Try this:

Code:
class Members_area extends CI_Controller {

function index()
{
  $is_logged_in = $this->loggedin->loggedin();
  if(!$is_logged_in)
  {
   $data['main_content'] = 'home';
  }
  else
  {
   $data['main_content'] = 'members_area';
  }
  
  // Grabbing all the files associated with the current user
  $this->load->model("upload_model");
  $q = $this->upload_model->get_files();
  $data['test_var'] = 'Test'; // Trying to use this variable in the views file
  $this->load->view('includes/template2', $data);
}

}


Messages In This Thread
Variable from Controller not working in Views - by El Forum - 08-16-2012, 05:07 PM
Variable from Controller not working in Views - by El Forum - 08-16-2012, 05:15 PM
Variable from Controller not working in Views - by El Forum - 08-16-2012, 05:18 PM
Variable from Controller not working in Views - by El Forum - 08-16-2012, 05:19 PM
Variable from Controller not working in Views - by El Forum - 08-16-2012, 05:45 PM
Variable from Controller not working in Views - by El Forum - 08-16-2012, 06:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB