Jump to content

Continue session() from another directory?


The Praetorian

Recommended Posts

This is kind of a round about question.Is it possible to get the session data for a user even if they logged in on a page in a different directory of my website?To clarify.. If someone logs in on my forum (phpBB), is it possible to continue that session on my website? I would imagine it would be something along the lines of adding session() to the page I want them to be logged in on, but I'm a little fuzzy on how it would get the information on whether or not they logged in on the previous page...Again, round about question. Any information anyone could provide would be greatly appreciated.

Link to comment
Share on other sites

Hi,yes Its possible if both's directory page's session var are samebut you have to check that this things not have any side effects..Regards,Vijay

Link to comment
Share on other sites

Sessions are dependent on the cookie. Sessions use cookies, and cookies will be set to a particular domain. When the browser visits the domain, the session ID cookie will be sent. When you set a cookie, you can also specify a path. If a piece of software on your server is setting the path of its login or session cookie to only apply to files in a particular directory, then other pages outside of that path will not receive the cookie. Whenever a cookie is set you can open it with your browser and see what the path and domain settings are.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...