0

I need to check if sure is logged in

  1. user login to account.domain.com

  2. system creates session for account.domain.com

    (at this point i want the user to also login to support.domain.com)

How does support.domain.com check if the user is logged into to account.domain?

Community
  • 1
  • 1
001
  • 62,807
  • 94
  • 230
  • 350

2 Answers2

1
  session_set_cookie_params(0, "/", ".domain.com");

note that leading dot. This functions should be called BEFORE session_start();

genesis
  • 50,477
  • 20
  • 96
  • 125
0

If you change your session cookie domain to .domain.com, then the same session will be accessible on both subdomains.

Session wont work with www

Community
  • 1
  • 1
Dan Grossman
  • 51,866
  • 10
  • 112
  • 101