I have a simple web site with many PHP pages. Among them, some four pages use common variables, which I should store in the session object. But the thing is, these values should not be visible to other pages, so I decided to use session_name to create a new session. It will start a new session but these four pages are using the values from the old session, which is creating a problem when I try to print $_SESSION: it is an empty array after the start of my new session. I want this new session to retain the old values plus new values.
I'm not looking for this $_SESSION['page_group']['variable_name'] kind of solution as I cannot use arrays.