I have a session variable $_SESSION['divcontent'] in one of my pages.
I have a main page that calls an ajax function which runs the page with the above mentioned variable.
I have an if (!isset) clause which is only supposed to trigger if the above session variable is not yet set.
However it’s not triggering at all. So i put an echo statement at the very beginning of this file to echo the variable, and it says its value is 0.
I have not referenced this variable in any other page. I changed the echo statement to echo a different variable not mentioned anywhere and it returned a variable not found error, as it should. I am viewing the page in live mode in dreamweaver. Each time i run it the session variables should reset to undeclared, shouldnt they?
Why is my variable self-instantiating at value = 0?
If you leave any site, but the browser is still open (if there are no windows open but a browser process is open), it is still possible to maintain the same session.
The one thing I like to do for testing session variables is to open Chrome in incognito mode and try the site there.