lovesmith Posted January 24, 2008 Share Posted January 24, 2008 I got a strange problem. I have membership site, where user can log in...view profile of other members, add them to friends list etc. When i log in...the session is set say $_SESSION("session_userid") And i can view the profile of user using http://www.username.mysite.com when i log in it takes me to http://www.mysite.com from there i want to view profile of username2 and i type http://www.username2.mysite.com but when i reach there my session gets destroyed... what is the problem? i havent destroyed session anywhere.......session shudnot be destroyed unless i redirect user to logout.php Please help me guys Quote Link to comment https://forums.phpfreaks.com/topic/87521-solved-my-session-gets-destroyed/ Share on other sites More sharing options...
PHP Monkeh Posted January 24, 2008 Share Posted January 24, 2008 Are you using $_SESSION['session_userid'] rather than your $_SESSION("session_userid") ? Also, do all pages have session_start() at the top? Quote Link to comment https://forums.phpfreaks.com/topic/87521-solved-my-session-gets-destroyed/#findComment-447652 Share on other sites More sharing options...
lovesmith Posted January 24, 2008 Author Share Posted January 24, 2008 Are you using $_SESSION['session_userid'] rather than your $_SESSION("session_userid") ? Also, do all pages have session_start() at the top? Thanks, yeah i have done $_SESSION['session_userid'] in all pages and session_start() is done in all pages as well Quote Link to comment https://forums.phpfreaks.com/topic/87521-solved-my-session-gets-destroyed/#findComment-447654 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.