RE: [PHP-WIN] Vars not accepted in script.php?var=xy

From: Date: Mon, 01 Jul 2002 08:09:27 +0000
Subject: RE: [PHP-WIN] Vars not accepted in script.php?var=xy
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-14491@lists.php.net to get a copy of this message
1st issue: If you are using v.4.2.x of PHP then globals are turned off by default as a security measure. You can either switch back on globals defined bt default by changing register_globals to On in your php.ini file (not a good idea for security however) or change your code to use the super global array i.e. $_GET['var'] 2nd issue: try $row['name'] in single quotes HTH Rich -----Original Message----- From: Uwe Birkenhain [mailto:uwe.birkenhain@berlin.de] Sent: 01 July 2002 08:46 To: php-windows@lists.php.net Subject: [PHP-WIN] Vars not accepted in script.php?var=xy 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. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.windows (#14491) next »