Re: Global variables, $_GET problem

From: Date: Thu, 25 Jul 2002 01:05:10 +0000
Subject: Re: Global variables, $_GET problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-20764@lists.php.net to get a copy of this message
Thank you very much for your help. It was a silly mistake. We had a few sites affected. I was so worried that I overlooked the simple problem. Thanks again. Mailing List is great (first time for me)! Ruth ----- Original Message ----- From: "Beau Lebens" <B.Lebens@curtin.edu.au> To: "'Ruth Zhai'" <rzhai@bigpond.com>; <php-db@lists.php.net> Sent: Wednesday, July 24, 2002 1:44 PM Subject: RE: [PHP-DB] Global variables, $_GET problem > Ruth, > > your reference to $_GET('var') is close, but as you have seen - no cigar :) > using the "()" after GET makes it refer to a function, but it is actually an > array which is automatically created, so you need to use > > $_GET['var'] (note the square brackets > > as for point 2 (register_globals) did you restart the apache service after > changing it? because registering globals should make $var available again > (but won't help with problem 1 :) > > HTH > > Beau > > // -----Original Message----- > // From: Ruth Zhai [mailto:rzhai@bigpond.com] > // Sent: Wednesday, 24 July 2002 11:39 AM > // To: php-db@lists.php.net > // Subject: [PHP-DB] Global variables, $_GET problem > // > // > // Hello php friends, > // We just upgraded our PHP to version 4.2.1. I realized that > // $var is no > // longer available from www.url.com/myphp.php?var=3 . As > // instructed in the > // document, we have tried two things: > // 1. I tried to use $_GET('var'), however, I got "Fatal error: Call to > // undefined function: array() in /home/httpd/... " message. I > // have no clue > // what this means, and what I have done wrong. > // 2. Set register_globals = on in the configuration file. > // This did not make > // any difference. > // > // I don's know what to do now. Your help is highly appreciated. > // > // Ruth > // > // > // > // -- > // PHP Database Mailing List (http://www.php.net/) > // To unsubscribe, visit: http://www.php.net/unsub.php > //

« previous php.db (#20764) next »