codeigniter - Can't get Another field from session -


i got problem session data, in web, want make different view based on previledge user, here code in controller :

    $previledge = $this->session->userdata['previledge'];     $data['previledge']=$previledge;     if($data['previledge'] == 'admin'){                 $this->load->view("app_admin/global/header",$d);                 $this->load->view("app_admin/materi/home");                 $this->load->view("app_admin/global/footer");     }     else {                 $this->load->view("app_admin/global/header2",$d);                 $this->load->view("app_admin/materi/home");                 $this->load->view("app_admin/global/footer");     }      } 

if run code above, previledge admin can't go right view. if there suggestion, please inform, thanks

its syntax error.

$previledge = $this->session->userdata('previledge'); 

this you.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -