session problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

session problem

Post by itsmani1 »

I am having a session problem.
I have 3 sub domains

beta.cmela.com
classifieds.cmela.com
community.cmela.com

I can login on beta.cmela.com but i am not to carry it on classifieds.com and community.cmela.com

Please help me
kryles
Forum Contributor
Posts: 114
Joined: Fri Feb 01, 2008 7:52 am

Re: session problem

Post by kryles »

you can use parse_url() to check what domain they are coming from and if it isnt what they currently are on then use session_destroy();

It should empty out all session variables I believe.

If you have globals, use unset for them. And cookies have to be destroyed by setting them to a time in the past.

I can't give details because I just got that from google :mrgreen:
Post Reply