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 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? 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 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
Archived
This topic is now archived and is closed to further replies.