unique session for a given site
Posted: Tue Feb 14, 2006 9:08 am
Hi,
I develop various sites with log in areas. I test them all on my Mac and when time is short I grab a login area from one project and use it in the next.
I've noticed that unless I log out of each site before developing / testing the next, I get the old session variables getting mixed up. i.e. $_SESSION['user'] is the same session variable name for site A and site B.
What I'd like to be able to do is make sure that sessions are only referred to for a particular site. As all my locally running sites are all at the same IP I think the sessions are getting muddled.
Any ways round this ? Will this be a problem in the real world if someone visits 2 sites that I've made, however unlikely?
Thanks,
Ed.
I develop various sites with log in areas. I test them all on my Mac and when time is short I grab a login area from one project and use it in the next.
I've noticed that unless I log out of each site before developing / testing the next, I get the old session variables getting mixed up. i.e. $_SESSION['user'] is the same session variable name for site A and site B.
What I'd like to be able to do is make sure that sessions are only referred to for a particular site. As all my locally running sites are all at the same IP I think the sessions are getting muddled.
Any ways round this ? Will this be a problem in the real world if someone visits 2 sites that I've made, however unlikely?
Thanks,
Ed.