Differences in session variable declaration |
@n2fole00,
I can't believe I missed this. The issue is your if condition. see... https://stackoverflow.com/questions/1374...s-0-in-php I would do something like this... $site_lang = ($_SESSION['site_lang'] === NULL)? FALSE : $_SESSION['site_lang']; or $site_lang = (isset($_SESSION['site_lang']))? FALSE : $_SESSION['site_lang']; (09-13-2018, 03:20 PM)php_rocs Wrote: @n2fole00, Ok thanks, but why does PHP Code: $site_lang = $ci->session->site_lang; PHP Code: $site_lang = $_SESSION['site_lang'] PHP Code: if ($site_lang) { |
Welcome Guest, Not a member yet? Register Sign In |