Re: [PHPLIB] correct purpose for user variables From: Nathaniel Price (seoman <email protected>)
Date: 12/18/99

----- Original Message -----
From: Danny William Adair <Danny <email protected>>
To: <phplib <email protected>>
Sent: Saturday, December 18, 1999 6:49 AM
Subject: [PHPLIB] correct purpose for user variables

[snip]
> Usually, I would store the user's data to another, phplib independent
table,
> using his username(or uid) as a key, and later, when I need to know his
> hobbies: get the username of the session from "auth" and look up his
hobbies
> in that "table of mine".

Yes, that would be the reccomended way of doing it.

> Isn't that what user variables are there for? What advantages do they
have?

They give you similar advantages as session data, except that, as you noted,
they are persistent; when the user logs in again, they'll get their user
variables back. I use them to store preferences; whether the user wants the
date displayed in GMT or a local time zone, what color scheme to use, etc.
Other things generally belong in a dedicated table.

______________________________________
Nathaniel Price <seoman <email protected>>
"Who is General Failure and why is he reading my hard disk?"

-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.