Forum Moderators: coopster
I am having a problem. Currently I have it setup for my site that when a user visits my site he gets assigned a user id consisting of letters and numbers 5 digits long. The variable is $_SESSION['userid'].
For some reason I am seeing in some web logs I created that some users get assigned a new id every page they visit. It is random pages so I don't think its specific pages that are doing this.
Is using a $_SESSION variable as a userid ok to use? Or, are problems associated with this?
If you need more info please feel free to ask :)
thanks.
Wes
Using the session var for tracking them is fine and is really fairly normal practice.
Are your sessions expiring? I assume you create the id yourself, have you looked at the auth script, or whatever you use to reassign the id, to see if it is the culprit?