Welcome Guest, Not a member yet? Register   Sign In
How to check session variable is empty ?
#9

[eluser]wiredesignz[/eluser]
[quote author="bigtony" date="1254231997"]affix: You might want to do your own checking on this, but I think you may run into a problem with:
Code:
if(isset($this->session->userdata('my_var'))
etc...
This is because the userdata function returns 'false' if the variable is not set, which means that isset will return true (because 'false' is a set value).[/quote]

You are both incorrect because you cannot run the isset() function on a function no matter what.


Messages In This Thread
How to check session variable is empty ? - by El Forum - 09-29-2009, 01:09 AM
How to check session variable is empty ? - by El Forum - 09-29-2009, 01:40 AM
How to check session variable is empty ? - by El Forum - 09-29-2009, 01:57 AM
How to check session variable is empty ? - by El Forum - 09-29-2009, 01:59 AM
How to check session variable is empty ? - by El Forum - 09-29-2009, 02:46 AM
How to check session variable is empty ? - by El Forum - 09-29-2009, 02:52 AM
How to check session variable is empty ? - by El Forum - 09-29-2009, 02:59 AM
How to check session variable is empty ? - by El Forum - 09-29-2009, 03:12 AM
How to check session variable is empty ? - by El Forum - 09-29-2009, 03:15 AM
How to check session variable is empty ? - by El Forum - 09-29-2009, 03:28 AM
How to check session variable is empty ? - by El Forum - 09-29-2009, 03:32 AM
How to check session variable is empty ? - by El Forum - 09-29-2009, 03:41 AM
How to check session variable is empty ? - by El Forum - 05-03-2012, 08:16 AM
How to check session variable is empty ? - by El Forum - 05-03-2012, 10:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB