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:[EMAIL PROTECTED]]
> Sent: Sunday, June 02, 2002 3:59 AM
> To: [EMAIL PROTECTED]
> 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                          [EMAIL PROTECTED]
> 
> Sorry if this question was here answered.
> 
> 
> --
> 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

Reply via email to