Its just a warning. It tells you that you are using a variable which has no
value. Just ignore the notice, or turn down error reporting to exclude
notices.

All it means is that the variable of $test which you have included in your
script HAS NO VALUE. If you were to write something like
$test = "I Have A Value Now!";
then the 'error' message would disappear. Most of the time, you DO NOT WANT
to give a variable a value, such as when a user submits a form to your
script. The $Variables are filled by the user, not the php script. If the
user misses out a field, they would see the error message you mentioned.

To turn it off...
go to your php.ini
Search for
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
and change the line which looks like (Make sure there is no ; at the start
of the line, if there is then its the wrong line to change!)
error_reporting = E_ALL
to
error_reporting  = E_ALL & ~(E_NOTICE | E_USER_NOTICE) ; display all errors
and warnings
This will make php only show the errors which affect the running of your
scripts, not the notices such as 'Empty Variables'

Hope this helps

Stephen

*** This is a quote from a mail I posted earlier. it seems a lot of people
ask the same question :-) ***

----- Original Message -----
From: "Elvin Certeza" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Thursday, December 12, 2002 9:52 PM
Subject: [PHP-WIN] newbie question (forms)


> I have just recently installed apache and php into my system (win98).
>
> The system test is ok....(showing php pages)
>
> Now for the question...
>
> I've created a form.. (rather cut and paste a form). This form works
online
> I have tested it myself.. but locally it gives me an error..
>
> When my php page loads it tells me  "Notice: Undefined variable" at line
> whatever.. etc..
>
> So what I've done it tested it online to see if it's the code...(full
> knowing that code works..since it's a cut out from a tutorial showing it's
> samples).. and it does work..
>
>
> So the question is .. is there anything missing from my local server ???
>
>
>
> Elvin
>
>
>
>
>
> --
> 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