Jump to content

[SOLVED] My session gets destroyed


lovesmith

Recommended Posts

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

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

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.