Help: Notice: Undefined variable: edit in.....
Hi,
I have some PHP code working fine on a web site.
I have installed Apache web server on my local PC with PHP and mySQL
It still works, but I get lots of errors like:
Notice: Undefined variable: edit in C:\Program Files\Apache
Group\Apache2\htdocs\schools\aenews.php on line 18
In this particular case the code is:
<? if ($edit == 'Y'){
$result=mysql("$DBName","SELECT * FROM news WHERE..........
If I lower the level of error reporting, the messages are removed (but I
seem to think this is a false way to resolve the problem)
if I use ' ' arount the vatiable it seems to remove the problem too.
ie:
<? if ('$edit' == 'Y'){
$result=mysql("$DBName","SELECT * FROM news WHERE..........
So, can anyone tell the real reason for the error messages and why I need
the ' ' marks?
Thanks.
Tim.
SORRY - I am quite a newbie at PHP!
|