title: Handling multiple sessions in PHP
body: <p>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 <code>session_name</code> 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 <code>$_SESSION</code>: 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.</p>
  
  <p>I'm not looking for this <code>$_SESSION['page_group']['variable_name']</code> kind of solution as I cannot use arrays.</p>