Page 1 of 1

Strange session

Posted: Thu Jan 10, 2008 7:18 pm
by thatsme
I have a login page and an inner page. The session is set when user log in and it is used in the inner page. This is correctly happening but, if i keep the page without doing anything (i think after session value gets lost) and if some other user logs in in another system then if i refresh my inner page, i am getting his id instead of mine. I am using PHP.

For setting the session when loging in i am using

session_start();
$_SESSION['member_id'];



in the inner page, i am using

session_start();
$id = $_SESSION['member_id'];

Thanks

Re: Strange session

Posted: Thu Jan 10, 2008 9:35 pm
by RobertGonzalez
The first part of your code does nothing with the session var. What are you attempting to do?

Re: Strange session

Posted: Fri Jan 11, 2008 1:00 pm
by thatsme
session_start();
$_SESSION['member_id'] = $memberID;

the $memberID value is in database.

Re: Strange session

Posted: Sat Jan 12, 2008 10:47 am
by RobertGonzalez
I think you are going to have to show more code. What you have posted so far is not nearly enough for us to figure out what is happening in that script.