Session Variables changing values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kylocke
    New Member
    • Jul 2006
    • 2

    Session Variables changing values

    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 :)
  • iam_clint
    Recognized Expert Top Contributor
    • Jul 2006
    • 1207

    #2
    sounds like these people aren't getting unique session id's you might look into that.

    Comment

    • kylocke
      New Member
      • Jul 2006
      • 2

      #3
      How would I set the session ID? That may infact be the issue.

      Comment

      • iam_clint
        Recognized Expert Top Contributor
        • Jul 2006
        • 1207

        #4


        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.

        Comment

        Working...