Custom session
-
Hello ,
i am trying to set session in theme so i have added code in header.php file of theme folder. when we set session it works but after refresh the page,it destroy. I have changed in load.php file also add ‘_session’ in wp_unregister_GLOBALS() function. I don’t know what it going wrong. My code is as follows:session_start();
if($_SESSION[‘usersubdomain’]){
echo “Session Set “.$_SESSION[‘usersubdomain’];
}
else{
echo “Session is not Set “;
$_SESSION[‘usersubdomain’]=”Check Session”;
}each and every time it echos “session is not set”;
- The topic ‘Custom session’ is closed to new replies.