This is not the same question i asked yesterday.
When i set error_reporting = E_ALL and display_errors = On in my php.ini,
i get the next message:
Notice: Undefined variable: varname in .
How can i fix this problem without setting error_reporting = E_ALL
~E_NOTICE and/or
This usually means that you're using a variable without having
initialized it. For example
$a = $b + 1;
will give you that warning if no value is assigned to $b prior to this
line. It's PHP's way of telling you that you might be doing something
wrong.
Perhaps if you post some of your code we
At 16:31 08.11.2002, R B spoke out and said:
[snip]
This is not the same question i asked yesterday.
When i set error_reporting = E_ALL and display_errors = On in my php.ini,
i get the next message:
Notice: Undefined variable: varname in .
How can
the data not when i submit the
data.
How can i fix the problem? or there is another best way to do this?
From: Marco Tabini [EMAIL PROTECTED]
To: R B [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Other Notice problem...
Date: 08 Nov 2002 10:25:46 -0500
This usually means that you're
: [PHP] Other Notice problem...
Date: 08 Nov 2002 10:25:46 -0500
This usually means that you're using a variable without having
initialized it. For example
$a = $b + 1;
will give you that warning if no value is assigned to $b prior to this
line. It's PHP's way of telling you that you
At 17:04 08.11.2002, R B spoke out and said:
[snip]
I'm going to explain how my script work.
I have an php page (addProduct.php) with an input form. I have 2 buttons
(add and cancel) and a hidden control with name=status. If i press the add
button, the
to on because if i set to off, i can't pass GET variables to other
page. how can you pass GET variables to other page without setting
register_globals=on?
From: Ernest E Vogelsinger [EMAIL PROTECTED]
To: R B [EMAIL PROTECTED]
CC: [EMAIL PROTECTED],[EMAIL PROTECTED]
Subject: Re: [PHP] Other Notice
At 17:27 08.11.2002, R B spoke out and said:
[snip]
The array_key_exists or isset is a good solution.
About your comment, i have the register_globals=on.
I have 2 questions:
1.- What's the relation to have register_globals=off with this notice
message?
If
PROTECTED]
To: R B [EMAIL PROTECTED]
CC: [EMAIL PROTECTED],[EMAIL PROTECTED]
Subject: Re: [PHP] Other Notice problem...
Date: Fri, 08 Nov 2002 17:31:25 +0100
At 17:27 08.11.2002, R B spoke out and said:
[snip]
The array_key_exists or isset is a good solution
On Friday, Nov 8, 2002, at 16:44 Europe/London, R B wrote:
if i have 2 pages: p01.php and p02.php,
with p01.php code:
...
...
a href=p02.php?pp=2link/a
...
...
and p02.php code:
...
...
echo $pp;
...
...
If i have register_globals=off, then when i click the link, in p02.php
page, the echo
And without using the $_GET[] array.
From: Stuart [EMAIL PROTECTED]
To: R B [EMAIL PROTECTED]
CC: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [PHP] Other Notice problem...
Date: Fri, 8 Nov 2002 16:52:50 +
On Friday, Nov 8, 2002, at 16:44 Europe/London, R B
On Friday, Nov 8, 2002, at 16:56 Europe/London, R B wrote:
And without using the $_GET[] array.
Why don't you want to use the $_GET array? If you really don't want to
use it you can use the extract function but if you're going to do that
you might as well have register_globals on.
--
At 17:44 08.11.2002, R B spoke out and said:
[snip]
About your comment 1:
if i have register_globals=on, why $status is not be set by PHP?
well _then_ we have 2 possibilities:
1) your form input field isn't named status but rather Status or
STATUS - take
On Saturday 09 November 2002 00:52, Stuart wrote:
How can i run the script without problems having register_globals=off?
p02.php code:
...
...
echo $_GET['pp'];
...
...
Yes. And try reading the manual, or the archives.
--
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open
On Saturday 09 November 2002 00:56, R B wrote:
And without using the $_GET[] array.
Probably by using black magic instead -- or maybe use $_REQUEST, but I don't
think you want to use that either :)
--
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems
Well, it's possible he's using an older version of PHP in which
superglobals did not yet exist.
Marco
-
php|architect -- The Monthly Magazine For PHP Professionals
Come visit us on the web at http://www.phparch.com!
On Fri, 2002-11-08 at 12:09, Jason Wong wrote:
On Saturday 09
On Saturday 09 November 2002 01:02, Marco Tabini wrote:
Well, it's possible he's using an older version of PHP in which
superglobals did not yet exist.
It looks to me as if he just wants to use plain $variable but with
register_globals disabled that's just not possible.
Unless you go through
It's ok. I understand that i can't use plain variables with
register_globals=on, but this is only for GET variables or to all variables?
Thanks,
RB
From: Jason Wong [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Other Notice problem...
Date: Sat, 9 Nov
On Friday, Nov 8, 2002, at 17:59 Europe/London, R B wrote:
It's ok. I understand that i can't use plain variables with
register_globals=on, but this is only for GET variables or to all
variables?
The value of register_globals only affects the CGI variables (get,
post, server, cookies, etc).
19 matches
Mail list logo