[Solved] Adding OR / || to if statement |
I want to be able to do two checks on my MY_Controller.php
Can check if my session token is set like PHP Code: if (!in_array($route, $ignore) && !$this->session->userdata('token')) { That works fine but want to add another another check for user_id it throws The page isn’t redirecting properly error PHP Code: if (!in_array($route, $ignore) && !$this->session->userdata('token') || !$this->session->userdata('user_id')) { How can I have both session userdata in there? PHP Code: <?php
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
|
Messages In This Thread |
[Solved] Adding OR / || to if statement - by wolfgang1983 - 02-23-2017, 09:54 PM
RE: Adding OR / || to if statement - by neuron - 02-23-2017, 10:13 PM
RE: Adding OR / || to if statement - by wolfgang1983 - 02-23-2017, 10:18 PM
RE: Adding OR / || to if statement - by wolfgang1983 - 02-23-2017, 10:56 PM
|