Technology TidBits

Answers to various technical questions on php programming, mysql, linux, and many more categories.



Add comment:
Name:
Email:
Comment: *
(Use BBcode - No HTML)


You MUST answer this simple math equation - to prevent spammers: 6 + 18 =  


php session id keeps changing on every reload - how can I fix this?

Last updated: 07/03/2009
The symptom here is that every reload of a page, causes a new session id to be assigned.  This of course, renders the session tracking useless, since the id keeps changing.

Make sure your "session_start()" call is at the top of your script.  That means, before any include calls, variable assignments, etc.  I just put it right after the opening "<?" to be safe. 

Good luck!




Powered by KnowledgebasePublisher 1.1
Superb Internet
Content provided by Roberts WebForge, Inc.