RE: [PHP] Re: tutorial on global variables

2002-05-03 Thread John Holmes
Just CPU time to make all of the new variables. ---John Holmes... > -Original Message- > From: John Hughes [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 02, 2002 9:58 PM > To: Philip Olson; [EMAIL PROTECTED] > Subject: Re: [PHP] Re: tutorial on global variables >

Re: [PHP] Re: tutorial on global variables

2002-05-02 Thread John Hughes
After reviewing http://www.php.net/manual/en/function.import-request-variables.php I was wondering if simply including this line at the top of all scripts import_request_variables("gP", ""); would eliminate the potential problem I would have if register_globals gets turned off unexpectedly?

Re: [PHP] Re: tutorial on global variables

2002-05-02 Thread Philip Olson
> I have several scripts that take it for granted PHP will assign > variables to the information in the URL as in your example $a from > example.com/foo.php?a=apple Okay, so they depend on the behavior that register_globals provides. > Will these scripts fail when my commercial Web host upgrade

Re: [PHP] Re: tutorial on global variables

2002-05-02 Thread John Hughes
Thank you for this explanation. I have several scripts that take it for granted PHP will assign variables to the information in the URL as in your example $a from example.com/foo.php?a=apple Will these scripts fail when my commercial Web host upgrades from PHP 4.1.x to 4.2? If so, can I 'upgra

Re: [PHP] Re: tutorial on global variables

2002-05-02 Thread Philip Olson
An issue/confusion of register_globals, global, and variable scope exists out there; here are some thoughts: a) As of PHP 4.2.0, register_globals defaults to off. This is a major change to consider. register_globals is a PHP directive that lives in php.ini, the configuration file th

Re: [PHP] Re: tutorial on global variables

2002-04-27 Thread Jason Wong
On Sunday 28 April 2002 04:39, Henrik Hansen wrote: > [EMAIL PROTECTED] (John Hughes) wrote: > > Can someone point me toward a tutorial on the proper use of global > > references under PHP4. The manual has very good information. > > > > I have been declaring > > > > function something() >

[PHP] Re: tutorial on global variables

2002-04-27 Thread Henrik Hansen
[EMAIL PROTECTED] (John Hughes) wrote: > Can someone point me toward a tutorial on the proper use of global > references under PHP4. > > I have been declaring > > function something() > { > global $foo, $bar; > > /* some actions */ > > } > > in functions and I understand that this is