Re: [PHP-DB] Secure variable transport (newbie)
Here is a link to a tutorial which explains the issues and introduces how to use the new global variables. Write Secure Scripts with PHP 4.2! http://www.webmasterbase.com/article/758 Regards, Doug On Thu, 23 Jan 2003 00:30:24 +0100, Karina S wrote: >Hi, > >I have read, that use global variables on php site is not a good idea. I'm >newbie in PHP and maybe a stupid question: >If I make an array and register it in a session and after I use it all of my >pages as $HTTP_SESSION_VARS['variable'] and register_globals is off. In this >case is $HTTP_SESSION_VARS['variable'] a global variable? > >What is the best method (most secure method) to use the same array on all >php site? (I want to read the user data, but don't want to read it always >from database. I want to read once and use it on more pages. ) > >Thanks for your help! > > > > >-- >PHP Database Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Secure variable transport (newbie)
Karina Use the superglobal $_SESSION[] array together with session_start(). $HTTP_SESSION_VARS[] is not a super global. Rich -Original Message- From: Karina S [mailto:[EMAIL PROTECTED]] Sent: 22 January 2003 23:30 To: [EMAIL PROTECTED] Subject: [PHP-DB] Secure variable transport (newbie) Hi, I have read, that use global variables on php site is not a good idea. I'm newbie in PHP and maybe a stupid question: If I make an array and register it in a session and after I use it all of my pages as $HTTP_SESSION_VARS['variable'] and register_globals is off. In this case is $HTTP_SESSION_VARS['variable'] a global variable? What is the best method (most secure method) to use the same array on all php site? (I want to read the user data, but don't want to read it always from database. I want to read once and use it on more pages. ) Thanks for your help! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php