[PHP] Understanding sessions

2004-04-09 Thread Todd Cary
I am trying to understand sessions are done with php. My learning script has the following: session_start(); if (isset($_SESSION['firstname'])) { $_SESSION['firstname'] = 'Todd'; } else { $_SESSION['firstname'] = 'Nobody'; } echo SESSION: . $_SESSION['firstname'] . br; echo

Re: [PHP] Understanding sessions

2004-04-09 Thread John W. Holmes
From: Todd Cary [EMAIL PROTECTED] I am trying to understand sessions are done with php. My learning script has the following: session_start(); if (isset($_SESSION['firstname'])) { $_SESSION['firstname'] = 'Todd'; } else { $_SESSION['firstname'] = 'Nobody'; }

Re: [PHP] Understanding sessions

2004-04-09 Thread Daniel Clark
Todd, I think you want the session_id() function. http://us3.php.net/manual/en/function.session-id.php I am trying to understand sessions are done with php. My learning script has the following: session_start(); if (isset($_SESSION['firstname'])) { $_SESSION['firstname'] =

Re: [PHP] Understanding sessions

2004-04-09 Thread Todd Cary
If I use session_id(), I do get a value. However, I have session_use_cookies = 0 and I do not have a value for SID. Is that correct? Todd Daniel Clark wrote: Todd, I think you want the session_id() function. http://us3.php.net/manual/en/function.session-id.php I am trying to understand

Re: [PHP] Understanding sessions

2004-04-09 Thread Todd Cary
Daniel - As suggested, if I turn off cookies in my browser, then SID is set. So the directive in php.ini does not cause the use of cookies to be completely turned off? Another question envolves the use of the back button. My client wants the use of the back button to be turned off for

Re: [PHP] Understanding sessions

2004-04-09 Thread Daniel Clark
I'm not certain. I normally use session variables to store and hold login username or order state. e.g. $_SESSION['username'] If I use session_id(), I do get a value. However, I have session_use_cookies = 0 and I do not have a value for SID. Is that correct? Todd -- PHP General

Re: [PHP] Understanding sessions

2004-04-09 Thread Daniel Clark
As suggested, if I turn off cookies in my browser, then SID is set. So the directive in php.ini does not cause the use of cookies to be completely turned off? My understanding is the php.ini sessions.save_path(?) is for PHP to have a temp directory to write session information on the server.

Re: [PHP] Understanding sessions

2004-04-09 Thread Curt Zirzow
* Thus wrote Todd Cary ([EMAIL PROTECTED]): If I use session_id(), I do get a value. However, I have session_use_cookies = 0 and I do not have a value for SID. Is that correct? SID is controlled by session.use_trans_sid Curt -- I used to think I was indecisive, but now I'm not so sure. --

Re: [PHP] Understanding sessions

2004-04-09 Thread Justin Patrin
Daniel Clark wrote: As suggested, if I turn off cookies in my browser, then SID is set. So the directive in php.ini does not cause the use of cookies to be completely turned off? My understanding is the php.ini sessions.save_path(?) is for PHP to have a temp directory to write session