I have a login script which creates a session ($_SESSION['Current_User']) which holds the User's ID.
Now i have tried many ways to solve my problem but no matter what i do, this session does not remain set when i use it on a subdomain when created on my main domain.
For example:
http://www.mydomain.com/login.php - SESSION set
http://www.subdomain.mydomain.com/index.php - Notice: Undefined index: Current_User
The two sites have this at the top of the script which i read was suppose to be the solution but its not working for me:
Code: Select all
<?php
session_set_cookie_params(0, '/', '.mydomain.com');
session_start();
?>I really need to fix this as its causing huge delays on my site development. Hope you can save me !