By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,380 Members | 3,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,380 IT Pros & Developers. It's quick & easy.

Session Variables changing values

P: 2
I am running PHP 5.1.4

I am not sure what is going on, but I will try to explain it best I can.

I have a few pages that personalize based on the user that logs in. It basically says "Hello, [NAME]" where [NAME] is $_SESSION[name]

Multiple people could be logging into this page from multiple machines. Sometimes though, when they log in, a different name shows up.

The names are held in a postgreSQL database associated with there username.

This doesn't happen all the time, but I can't pinpoint when it does happen either. It seems the name is random from the database, and may not be related to the next person who logged in. I am not sure if I am not handling the sessions correctly, or if only one variable can be stored. Each page you go to does a session_start ();

I am not sure what other information is needed, but its a persistant problem I am trying to track down. Any help will be helpful :)
Jul 13 '06 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 1,208
sounds like these people aren't getting unique session id's you might look into that.
Jul 15 '06 #2

P: 2
How would I set the session ID? That may infact be the issue.
Jul 17 '06 #3

Expert 100+
P: 1,208

is a good place to look at sessions..

i'm not saying thats the problem i said it might be.... it could be a problem with your sql statement how your pulling the users data out of the DB if you post your code where it pulls out of the db and sets the session i could help you further.
Jul 17 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.