PHP sessions across subdomains

If you are facing problems sharing sessions across subdomains, use the following code before session_start().

ini_set ( 'session.cookie_domain', '.mysite.com' );

Replace mysite.com with your domain name.

Bookmark and Share

  • No related posts
  • Leave a Comment