[nycphp-talk] User Login / Auth Class - SIMPLISTIC please
Tim Gales
tgales at tgaconnect.com
Wed Jan 28 21:16:08 EST 2004
sry writes:
"Can't PHP create a an instance of a "session" that contains the user's
state? (what page they are on, what forms they have / haven't
completed, what default StyleSheet they prefer, etc.)"
I am not sure, but you may be confusing communication protocol state
with application state.
For example http is a stateless protocol. Cookies can be
used to create communication protocol state. Php's session
support can make use of the client's protocol state to
preserve application data over a series of http request/response
interactions. That is to say, yes 'an instance of a "session" contains
the user's (communication) state'-- but not "what default StyleSheet
they prefer" (that is application data or application state).
After thinking about the above, re-read what Mitch
writes:
"What I was trying to point out was that
once someone submitted 'form1', you could set it as a $_SESSION
variable. You could even just set $_SESSION['form_1']=TRUE and be done
with it - PHP4 tracks that for you (no muss, no fuss, no messy
applicator brush!)... Please see
http://us3.php.net/manual/en/ref.session.php for more details."
In other words, $_SESSION['form_1']=TRUE is equivalent to
saying task_1 is done, now the user is ready to move to
task_2 the next (applcation) state.
Hope this sheds some light on the situation.
T. Gales & Associates
'Helping People Connect with Technology'
http://www.tgaconnect.com
More information about the talk
mailing list