Re: Global variables? (unset/set or what?)

From: Date: Sat, 19 May 2001 22:24:38 +0000
Subject: Re: Global variables? (unset/set or what?)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-53563@lists.php.net to get a copy of this message
Try the define function. That will define a constant that you will always have access to (within functions, through various included files,etc.) Or you can write values to the $GLOBALS array of global variables. $GLOBALS["userPassword"]="u8943fd"; Will define a variable that is accessible as $userPassword. outside of functions and within functions available after the global $userPassword; command is within the function. HTH, Michael Richard wrote: > Greetings. > > I have about two include files which are included in every php page that > I have, and I wish to store global variables, such as passwords, usernames > and other details information. > After going through the PHP manual, all I could find was UNSET/SET > global variables, but I don't know if that is the one to use or not... they > looked like if they were to be doing something else. > > Any help or ideas? > > - Richard > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#53563) next »