I'm so confused that I'm sleepy. Or maybe it's the other way around. Anyhow... got a little question. I'm starting to play around with sessions, but I'm encountering a little trouble. I created a class called Session with methods that sets up the variables for the session. So on my first page, I'd create the new session.
My constructor is something like:
function Session ($variable) {
session_start ();
$this->sid = session_id ();
if (session_register ("sid") &&
session_register ($variable)) {
return TRUE;
}
else {
return FALSE;
}
}
and I call it like: $session = new Session ("session")
So I figure that $session will be available to subsequent pages. Inside the Session class there are variables like "session_id." However, upon accessing the $session object again, I found that some of the variables in that object have had their values changed, while some have remained the same.
Help? =P
Sleepy,
Nelson