I know this issue's been raised by others before, but sadly I can't get it working still.
My site has many subdomains, and I want members to stay logged in no matter which subdomain they visit. However, even after following advice to put this session_set_cookie_params line before session_start() at the top of each file, the session is still only recognized in the root domain.
<?php
session_set_cookie_params(0, '/', '.mydomain.com');
session_start();
I've also heard of removing the dot before mydomain.com in the above code, but that doesn't work either.
Can anyone please tell me what I'm doing wrong? :queasy:
If it helps, here's how the member's cookie is set when they log in:
setcookie("username", $login_username, time()+60*60*24*365, "/", ".mydomain.com", FALSE, TRUE);