I have one domain (domain.com) with multiple sub-pages that have different sessions (by default) and I want some of those sub-pages to share a session.
So for example I have domain.com/section1/staff/
and domain.com/section2/staff/
.
I am using the $_SESSION
variable to store info on the currently logged in user and I want to be able to log in once in section1/staff/
and still be logged in when I go to section2/staff/
.
From reading other postings it seems like this is the default way that sessions should work and in both pages the domain isn't set and the path is "/" in session_get_cookie_params()
so it should be the same session but it's not sharing the $_SESSION
variable and even when I call session_destroy()
it doesn't destroy the other session.
Is there a way to explicitly set them to use the same (or another place to look for default settings that wouldn't show up in the session_get_cookie_params()
array)?