Welcome Guest, Not a member yet? Register   Sign In
Please help with session
#2

[eluser]CroNiX[/eluser]
The proper way would be to check for the session variable before doing anything with it, just like you should with any other variable that may or may not be present.

Code:
if ($this->session->userdata('key') !== FALSE)
{
  // do something with session
}

However, you are using a mixture of CI's session class and PHP Native Sessions (WHY???), so you need to do the same type of thing except checking to see if your session variable isset() before trying to use it. This doesn't really have anything specific to do with CI, but rather trying to use PHP variables that may not be set.


Messages In This Thread
Please help with session - by El Forum - 03-06-2012, 08:27 AM
Please help with session - by El Forum - 03-06-2012, 01:32 PM
Please help with session - by El Forum - 03-07-2012, 07:49 AM
Please help with session - by El Forum - 03-07-2012, 08:53 AM
Please help with session - by El Forum - 03-07-2012, 09:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB