NYCPHP Meetup

NYPHP.org

[nycphp-talk] Session Thoughts

Jim Musil jmusil at villagevoice.com
Fri Oct 31 11:32:14 EST 2003


Hi,

I'm looking for some general guidance from those who may have gone down this
road before.

I'd like to be able to use PHP's Session functionality while a user is on my
site to save whichever preferences and other data the user chooses. Since
Sessions by definition end, I need to bring them back once the user comes
back.

It's a pretty simple structure to describe:

1. User comes to site.

2. Site checks for cookie or asks for log in. If either, then site restores
session data. If neither, then start anew.

3. User uses site to heart's content. New Prefs and data are added to
session and saved until next return.


The big question in my mind is whether this needs to be stored in a database
or can I just move the session files to storage directory?

How do I ensure that the new data and prefs is stored?

Can I just choose to not expire my session files?


Thanks for your thoughts!

Jim Musil




More information about the talk mailing list