Re: Vars not accepted in script.php?var=xy

From: Date: Mon, 01 Jul 2002 07:54:38 +0000
Subject: Re: Vars not accepted in script.php?var=xy
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-14490@lists.php.net to get a copy of this message
When uploading this question, I received an older answer: > - is it now neccessary to define variables before I use them??? No, but realize 4.2 changed how variables are referenced. By default register_globals is set to off now. - Steve Yates and that's it: when I set register_globals to 'on' it's working - thank's Steve! But since it is recommended to use 'off' (and will be standard in the future): does that mean that it's not longer possible to pass variables in an URL???? greetings, Uwe Uwe Birkenhain schrieb in Nachricht <20020701074810.534.qmail@pb1.pair.com>... >Hi, >I try to use PHP on my Win98 PC. It is mainly running but there is a >problem: >When I want to submit variables in the url >(http://localhost/script.php?var=xy), >the script will not know them and show me the message "Notice: undefined >variable var ..." > >Conditions which depend on var will not work. > >I thougt that perhaps there has something to be enabled in php.ini - but >couldn't find anything. > > >The next problem, which is perhaps connected to the first: >When using something like: > while ($row = mysql_fetch_array($result)) { > $name = $row[name]; } > >I get the message: > "Notice: Use of undefined constant name - assumed 'name' in ..." > >It is working and can be suppressed by not let php show the warnings - but >I'm surprised about it. > > >Has anybody the right hint for me? > >Uwe > >PS.: Those scripts run very well when used on the webserver - but not at >home. > >

« previous php.windows (#14490) next »