Re: Newbie scope revisited

From: Date: Thu, 13 Nov 2003 21:36:36 +0000
Subject: Re: Newbie scope revisited
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-169581@lists.php.net to get a copy of this message
"Matthew Morvant" <mmorvant@nha.net> wrote in message news:20031113210054.34773.qmail@pb1.pair.com... > I posted a couple of days ago inquiring as to why some inhierited PHP code > was not working. I determined that scope was the issue. The overwhelming > response I got back pertained to register_globals. I have read up on > register_globals and realize that it is not considered good practice to use > it. Still investigating I run phpinfo(), it turns out that register_globals > is set to ON (both places). However the server does not act this way. I > searched for an htaccess file, which I belive (not sure) can override > settings in the ini file. I could not find one. So now I am stuck in the > same place I started. My client doesn't want to pay for me to "scope" all > of the variables in the application, but it doesn't appear to work without > the proper scoping. Any suggestions on further research will be > appreciated. > > Matthew To clarify "both" places are the Local value and the Master value. An example of code that doesn't work follows asume a user follows this link http://test/test.php?adduser=1 <?php if( isset($adduser) ) /////// If I change to if(isset($_GET['adduser'])) all works fine { // function properly } else { //crap out } ?>

« previous php.general (#169581) next »