Logic OR using == |
Hi, i want to do this, only superadmin and admin have access to certain menu.
I use this,,,but it not works , is it something wrong here? if($this->session->userdata('level') == "superadmin" and "admin")
Try adding round brackets because I think $admin is treated as a logical value.
You want
PHP Code: if($this->session->userdata('level') == "superadmin" || $this->session->userdata('level') == "admin") |
Welcome Guest, Not a member yet? Register Sign In |