How do I use session variables with domain.com and sub.domain.com?
This question has been asked several times but they lack an explanation I can understand. I have a user login on domain.com that when submitted creates session variables. When they are redirected to sub.domain.com those variables are inaccessible.
I have tried to edit htaccess and adding an ini_set to the top of my script. I have also tried to send domain.com to sub.domain.com's login script but the variable is only saved for domain.com. The htaccess technique I found here ended with server 500.
No only do I want a solution, but preferably if someone can explain why it is happening. I would like to know what the best practice for this is. Thanks in advance.