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:[EMAIL PROTECTED]]
Sent: 01 July 2002 08:46
To: [EMAIL PROTECTED]
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


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to