[nycphp-talk] Experts help needed (Sessions)
Dan Cech
dcech at phpwerx.net
Wed Aug 3 11:28:10 EDT 2005
Joseph,
In that case just have your script insert/update the session table with
the page-specific data when you know it, like:
1. start session
2. check logins, etc
3. insert/update session page data/type/etc
4. do real processing
5. save session data
you would probably want to only use the save callback (step 5) to update
the actual session contents, and use your own script to manage the rest
of the data (in step 3).
Adding a lock field to the session table may not be a bad idea either to
prevent multiple or popup windows etc from messing up the session.
Dan
Joseph Crawford wrote:
> Dan,
>
> the issue with the read method is this.
>
> when session_start() is called the user type is unknown. the user type is
> set when i do
>
> $user = new Admin();
> $user = new Client();
> etc..
>
> i am trying to think of a way to make this take place before the
> session_start because then it would work fine i think. Right now if i use
> the read method it registers every user as a Guest.
More information about the talk
mailing list