RE: [PHP] How to pass on a variable wit h a page request

From: Date: Wed, 22 Nov 2000 10:40:01 +0000
Subject: RE: [PHP] How to pass on a variable wit h a page request
Groups: php.general 
Request: Send a blank email to php-general+get-26605@lists.php.net to get a copy of this message
Hmm, ok Thats because http_get_vars / post_vars isn't defined - so its bombing out. Have another look at your php_register_globals See if thats turned on. It should be - have a look at the manual for more details. Also check, check, check your <?phpinfo();?> to see your current settings register_globals and track_vars are the two settings which are causing this... Hope this helps! Cheers, Lawrence. -----Original Message----- From: Bruno Tersago [mailto:bruno@fhw.gr] Sent: November 22, 2000 06:32 PM To: Lawrence.Sheed@dfait-maeci.gc.ca Cc: php-general@lists.php.net Subject: Re: [PHP] How to pass on a variable with a page request Yes, track_vars is indeed turned on in my php config. The code of my test.php is: <html> <head> <title>test</title> </head> <body bgcolor="#ffffff"> <p> <?php print "<br>GET:".$HTTP_GET_VARS ("user"); print "<br>POST:".$HTTP_POST_VARS ("user"); print "<br>INTERNAL:".$user; ?> </body> </html> And in my browser, I enter the address http://euclides.fhw.gr/test.php?user=Bruno I read through the manual, but I can't figure out what is wrong, because the php configuration seems to be OK. -- Bruno ----- Original Message ----- From: <Lawrence.Sheed@dfait-maeci.gc.ca> To: <bruno@fhw.gr> Cc: <php-general@lists.php.net> Sent: Τετάρτη, 22 Νοεµßρίου 2000 12:17 µµ Subject: RE: [PHP] How to pass on a variable with a page request > I forgot to ask > > Is track_vars turned on in your php config? > > Its always on in php4.03, but not on unless specified on in earlier > versions. > > Also, can you post your test.php please? > > I think your code is bad, not your php ;) > > Some things you should read about variable precedence: > > http://www.php.net/manual/html/language.variables.external.html > > > Also have a look at > http://www.php.net/manual/html/configuration.html > > Cheers, > > Lawrence. > > -----Original Message----- > From: Bruno Tersago [mailto:bruno@fhw.gr] > Sent: November 22, 2000 06:14 PM > To: Lawrence.Sheed@dfait-maeci.gc.ca > Cc: PHP General > Subject: Re: [PHP] How to pass on a variable with a page request > > > Hi Lawrence, > > I think I located the problem now thanks to your suggestions. > > > I would first try passing the url to a test file eg > > > > test.php > > <? > > print "<br>GET:".$HTTP_GET_VARS ("user"); > > print "<br>POST:".$HTTP_POST_VARS ("user"); > > print "<br>INTERNAL:".$user; > > ?> > > > > I did what you suggested and the answer I got from PHP was: > Call to undefined function: array() in /usr/local/httpd/htdocs/test.php on > line 9 > > This means that PHP does not recognize the function $HTTP_GET_VARS > I don't know why this happens, but I suppose this is the reason why the > variables don't appear in my pages. > Funny, because register_globals is On in my php.ini > > Any thoughts? > > -- Bruno > > > -- > 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 (#26605) next »