How do sessions work exactly?

From: Date: Fri, 28 Jul 2000 08:07:23 +0000
Subject: How do sessions work exactly?
Groups: php.general 
Request: Send a blank email to php-general+get-8729@lists.php.net to get a copy of this message
I am way lost on sessions. What I am trying to do is have a cookie identify a message board poster. But to prevent people from being able to make their own cookies with someone else's identity contained, I don't want to use a plain old cookie to store their identity. If I understand corectly, a session would send a cookie that contains a unique ID string, and that ID string would the be associated with the variables stored on my server. Is this correct? Assuming that's how its supposed to work, how do I make it work like that? The persons identity will already be stored in a mysql database, can I have the session point to the database itself? What I am doing so far is just using session_register($name, $blarg) in the registering script. So if they register blarg is set to 1, and stored with the name they used as the session. Then, in theory I should be able to call those variables in other pages used to actually post messages right? What exactly do I need to do to be able to access them from the other pages? All I have is session_start() at the beggining of the other pages, and that's not working. Thanks for any help Generic Player

« previous php.general (#8729) next »