I have a website www.example.com
. Subdomain is sub.example.com
. I am using shared server, so I cant access php.ini. In www.example.com login page I am using
session_start();
$_SESSION["UserId"]=$UserId;
So thab I can use $_SESSION["UserId"]
. But when I try to access session in sub.example.com it failed. No session available. How I get session variables in subdomain. What are the codes for example.com and also for sub.example.com.