Re: [PHP-DB] Learning PHP Sessions

2001-10-31 Thread Jim Lucas
uot;Steve Cayford" <[EMAIL PROTECTED]> Cc: "Matthew Tedder" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, October 31, 2001 8:44 AM Subject: Re: [PHP-DB] Learning PHP Sessions > > * session_register('myvar'); creates a session var called $my

Re: [PHP-DB] Learning PHP Sessions

2001-10-31 Thread Russ Michell
* session_register('myvar'); creates a session var called $myvar * session_start(); needs to be called from the top of each script that will need the session var $myvar * session_destroy('myvar'); rids you of $myvar completely. * session_destroy('HTTP_SESSION_VARS'); rids you off *all* current

Re: [PHP-DB] Learning PHP Sessions

2001-10-31 Thread Steve Cayford
This is really off-topic for this list, but... From my understanding of sessions, you really don't want session_start() in an if{} block. Every time you hit this script, it will have no memory of any session variables until you call session_start(). -Steve On Tuesday, October 30, 2001, at 02

Re: [PHP-DB] Learning PHP Sessions

2001-10-30 Thread Szii
You do not need to destroy session variables. You can session_unregister() them, if you'd like. $session_start(); $foo = "Hi"; session_register("foo"); Next page... if (isset($foo)) { echo "$foo"; // will print "Hi" if done correctly session_unregister("foo"); } Sessions are automatically