RE: [PHP] php sessions

From: Date: Sun, 02 Jun 2002 15:27:36 +0000
Subject: RE: [PHP] php sessions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-100317@lists.php.net to get a copy of this message
You have to define the constants on each page. The second page doesn't know what S_USER, S_USER_ID, or S_USER_NAME are...unless you define them again. ---John Holmes... > -----Original Message----- > From: Michal Dvoracek [mailto:michal.dvoracek@capitol.cz] > Sent: Sunday, June 02, 2002 3:59 AM > To: php-general@lists.php.net > Subject: [PHP] php sessions > > Hello, > > i'm using sessions in my application but i found something strange. > > 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'; > > when redirect on next page - session is empty but when a change first > define to: > define('S_USER', 'user'); > > everything works ok. > > So in session isn't possible use numeric indexes ? > > Regards, > Michal Dvoracek michal.dvoracek@capitol.cz > > Sorry if this question was here answered. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#100317) next »