[PHP] Array into $_SESSION
Hi all, can somebody remind me how to propperly insert not just one but many variables into a $_SESSION handle? php manual doesn't explain it very well. It just says that it can be done. Thanks in advanced, Cesar Aracena -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array into $_SESSION
On Friday 02 January 2004 02:11 am, Cesar Aracena wrote: Hi all, can somebody remind me how to propperly insert not just one but many variables into a $_SESSION handle? php manual doesn't explain it very well. It just says that it can be done. $_SESSION['foo'] = array('a', 'b', 'c', 'd', 'e'); var_dump($_SESSION['foo'][3]); = 'd' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array into $_SESSION
Thanks a lot :) Gerard Samuel [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] On Friday 02 January 2004 02:11 am, Cesar Aracena wrote: Hi all, can somebody remind me how to propperly insert not just one but many variables into a $_SESSION handle? php manual doesn't explain it very well. It just says that it can be done. $_SESSION['foo'] = array('a', 'b', 'c', 'd', 'e'); var_dump($_SESSION['foo'][3]); = 'd' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Array into $_SESSION
session_register(user); session_register(authLevel); session_register(sessionExpire); $user=$userDataFromForm; $authLevel = $authLevelFromDB; $sessionExpire = time() + 3600; etc... -Original Message- From: Cesar Aracena [mailto:[EMAIL PROTECTED] Sent: Friday, January 02, 2004 2:11 AM To: [EMAIL PROTECTED] Subject: [PHP] Array into $_SESSION Hi all, can somebody remind me how to propperly insert not just one but many variables into a $_SESSION handle? php manual doesn't explain it very well. It just says that it can be done. Thanks in advanced, Cesar Aracena -- 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] Array into $_SESSION
Sorry, my bad. This is the Register Globals on version... with RegisterGlobals off you would simply use.. $_SESSION['user'] = $userDataFromForm; $_SESSION['authLevel'] -Original Message- From: Larry Brown [mailto:[EMAIL PROTECTED] Sent: Friday, January 02, 2004 11:33 AM To: Cesar Aracena; PHP List Subject: RE: [PHP] Array into $_SESSION session_register(user); session_register(authLevel); session_register(sessionExpire); $user=$userDataFromForm; $authLevel = $authLevelFromDB; $sessionExpire = time() + 3600; etc... -Original Message- From: Cesar Aracena [mailto:[EMAIL PROTECTED] Sent: Friday, January 02, 2004 2:11 AM To: [EMAIL PROTECTED] Subject: [PHP] Array into $_SESSION Hi all, can somebody remind me how to propperly insert not just one but many variables into a $_SESSION handle? php manual doesn't explain it very well. It just says that it can be done. Thanks in advanced, Cesar Aracena -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php