[eluser]ZioN[/eluser]
I want to pass information from a database table to a view, but I cannot get it to pass over the result.
Controller (acp):
Code:
public function get_users(){
$this->load->model('users_model');
if ($this->users_model->get_users_model()){
print_r ($data);
//redirect('acp/users/manage_users', $test);
}
else{
//
}
}
Model (users_model):
Code:
public function get_users_model(){
$query = $this->db->get('users');
if ($query){ // if succesful
$data = $query->result();
return $data;
}
else{ // if not successful
return false;
}
}
A print_r (to test if the $data contains variables) on the model works, but it will not give the data back to the controller and thus not to the view.