Forum Moderators: coopster

Message Too Old, No Replies

Session ID problem

creating an id for a user while on my site

         

wfernley

3:42 pm on Nov 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello,

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

jatar_k

11:01 pm on Nov 22, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



do you have any logs that might help to pinpoint the problem?

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?