Re: php sessions
| From: | Alexander Skwar | Date: | Sun, 02 Jun 2002 16:27:47 +0000 |
| Subject: | Re: php sessions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100320@lists.php.net to get a copy of this message | ||
Michal Dvoracek wrote:
when creating new session: define('S_USER', 0); define('S_USER_ID', 0); define('S_USER_NAME', 1); session_start(); $_SESSION[S_USER][S_USER_ID] = 1; $_SESSION[S_USER][S_USER_NAME] = 'Michal';Hm, you're defining a session variable called 0? Because PHP will translate the [S_USER] to [0] because S_USER is a constant defined as 0. PHP doesn't allow variables to start with a digit, and I don't think it will work in this case either.