I am running a test and live site on the same server. They have separate DB’s and live in separate directories, but are both on the same domain. As the code is the same, so are the variable names, so if I have pages from both environments open at once the values get shared. How can I isolate my $_SESSION variables to its own distinct environment?
give your session a name before starting it
session_name('PROJECT1');
session_start();