Let's say I run a server. I have two people using the server. Bill and Joe.
Bill is at address.com/bill and Joe is at address.com/joe.
Let's say Joe and Bill are both using PHP with sessions on their web pages.
Let's say they both create the session variable $_SESSION['yo']. Each uses
yo for a different purpose.
Now we have a user accessing address.com. He goes to Bill's site and his
session his started with the $_SESSION['yo'] created.
But then the user sees Joe's site, and he goes to it without closing his
browser. Joe's script sees that $_SESSION['yo'] exists and uses it. But
wait, it has bad data from Bill's site. Oh no! The world explodes and all is
lost.
Question: What is the best way to stop this unintentional overlapping of
session variables? Is there a way of maintaining separate sets of session
data?
Thank you again, I know I have a lot of questions.
Bill is at address.com/bill and Joe is at address.com/joe.
Let's say Joe and Bill are both using PHP with sessions on their web pages.
Let's say they both create the session variable $_SESSION['yo']. Each uses
yo for a different purpose.
Now we have a user accessing address.com. He goes to Bill's site and his
session his started with the $_SESSION['yo'] created.
But then the user sees Joe's site, and he goes to it without closing his
browser. Joe's script sees that $_SESSION['yo'] exists and uses it. But
wait, it has bad data from Bill's site. Oh no! The world explodes and all is
lost.
Question: What is the best way to stop this unintentional overlapping of
session variables? Is there a way of maintaining separate sets of session
data?
Thank you again, I know I have a lot of questions.
Comment