Curt, et al -- ...and then Curt Zirzow said... % % * Thus wrote David T-G ([EMAIL PROTECTED]): % > % > Should I use $_SESSION for everything or should I use session_start and % > session_register and friends instead? Is there a clear win with either % > one? % % $_SESSION is the proper way to do it (with globals off), you will still need to call % session_start() on each page.
Ahhh... OK; that's the key. So I session_start but that's all, and then
I write into $_SESSION to save it and read from $_SESSION whenever I want
its value. And to unset a var (incorrect password entered so I want to
wipe out that entry) can I unset($_SESSION[varname])? And, finally, do I
need session_write_close() any more?
The way I'm doing things at the moment has all of my session stuff in my
main include file, which gets called first. It looks like
session_name('$sname') ;
session_start() ;
session_register('pw') ;
session_register('authemail') ;
...
and it keeps all of "that session stuff" out of the way of the rest of
the code, where I later just check
if ( $pw != $passwordcom )
{
...
}
and such. It seems to me that for a fast fix I could set $pw and other
vars in my include file in place of registering them and then, later,
take my time to correctly switch over to $_POST['pw'] and $_SESSION['pw']
everywhere. Does that sound like a good two-step approach to get all of
my code back up and running the soonest? [I won't be able to check this
today but I'll be on it tomorrow morning at 0500ET when my day starts, so
please don't think I'm just fishing for answers; I'd love to see some by
then but if not I'll forge off on my own!]
%
% Curt
Thanks & HAND
:-D
--
David T-G * There is too much animal courage in
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
pgp00000.pgp
Description: PGP signature

