Re: [PHP] Session output question

2003-10-22 Thread CPT John W. Holmes
From: Susan Ator [EMAIL PROTECTED]
 1) Is there any way to print out active sessions names?

 I have $_SESSION['SID'], $_SESSION['uid'], $_SESSION['msg']
 can I output the literal strings:
 $_SESSION['SID']
 $_SESSION['uid']
 $_SESSION['msg']

$keys = array_keys($_SESSION);

 2) Is there any way to use a variable in a session name?

 can I do:
 $msg=20031022
 $_SESSION[$msg.name] becomes $_SESSION['20031022name']

Just like that or $_SESSION[$msg.'name']. Same rules as making a string
anywhere else; that's all you're doing.

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Session output question

2003-10-22 Thread Susan Ator
Perfect. Thank you so much. That was exactly what I needed.

Susan

-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 22, 2003 1:53 PM
To: Susan Ator; [EMAIL PROTECTED]
Subject: Re: [PHP] Session output question


From: Susan Ator [EMAIL PROTECTED]
 1) Is there any way to print out active sessions names?

 I have $_SESSION['SID'], $_SESSION['uid'], $_SESSION['msg']
 can I output the literal strings:
 $_SESSION['SID']
 $_SESSION['uid']
 $_SESSION['msg']

$keys = array_keys($_SESSION);

 2) Is there any way to use a variable in a session name?

 can I do:
 $msg=20031022
 $_SESSION[$msg.name] becomes $_SESSION['20031022name']

Just like that or $_SESSION[$msg.'name']. Same rules as making a string
anywhere else; that's all you're doing.

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session output question

2003-10-22 Thread Curt Zirzow
* Thus wrote Susan Ator ([EMAIL PROTECTED]):
 
 2) Is there any way to use a variable in a session name?
 
   can I do:
   $msg=20031022
   $_SESSION[$msg.name] becomes $_SESSION['20031022name']

In this case the _SESSION key is 20031022.name. You'll want
something like:

  $_SESSION[{$msg}name] or
  $_SESSION[$msg.'name']


Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php