Welcome Guest, Not a member yet? Register   Sign In
How to avoid errors in view when I am using variable for the php session
#3

[eluser]Yorick Peterse[/eluser]
As said by demedes, you get that error since the item doesn't exist. Use the following code to check whether the item exists or not. You should also note that plain PHP sessions don't work with CodeIgniter by default.

Code:
<?php
if(isset($_SESSION['some_key'])) {
    echo $_SESSION['some_key'];
}
else
{
    $_SESSION['some_key'] = 'some value';
}
?>


Messages In This Thread
How to avoid errors in view when I am using variable for the php session - by El Forum - 01-10-2010, 06:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB