• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
proper use of two conditions in using sessions?

#1
[eluser]new_igniter[/eluser]
Hello,
Can anyone tell me the right syntax for using two conditions (in an if statement) while using CI sessions?

I tried:

if ($this->session->userdata('stat') != "OK" && $this->session->userdata('name') != "fred")
{
do something
}

this doesnt work and throws errors. My apologies in advance for being dumb.

#2
[eluser]GSV Sleeper Service[/eluser]
that looks ok to me, what error do you get?

#3
[eluser]new_igniter[/eluser]
I was being careless. It was something else! My bad, thanks Sleeper!!!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.