Jump to content

Multisite login


LittleJoe

Recommended Posts

If I have a website, say example.com, and I use PHP sessions to store the login details, can I then access the same session from my.example.com and another.example.com? I need a website with subdomains that have different purposes but the user should only have to log in once at the root domain.

Link to comment
Share on other sites

you need to use http://php.net/manual/en/function.session-set-cookie-params.php to set domain of your site and rest of your subdomain will have same same session. Apart from using this on each script you can also change corresponding field in php.ini to do the same thing.

Link to comment
Share on other sites

Hello friend, Sessions names must be same for all websites, then all of the websites must be opened in the same browser.then you can get succeeded in the above task.

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...