Re: Re: NULL value for variable
| From: | Andrey Hristov | Date: | Thu, 21 Feb 2002 16:16:16 +0000 |
| Subject: | Re: Re: NULL value for variable | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-85740@lists.php.net to get a copy of this message | ||
It seems that you use global where it is not needed- outside of any function
First error because error_reporting is not set to 0 in php.ini so error_reporting valus includes
E_WARNING.
if you set error_reporting=0 in php.ini or error_reporting(0); in the script you will not receive
the first warning but probably
lose the second which is useful.
Best regards,
Andrey Hristov
----- Original Message -----
From: "Narvaez, Teresa" <Teresa.Narvaez@DynCorp.com>
To: "'Sanduhr'" <sanduhr@subdimension.com>;
<php-general@lists.php.net>
Sent: Thursday, February 21, 2002 6:05 PM
Subject: RE: [PHP] Re: NULL value for variable
> I comment it out but I got this error:
>
> Warning: Undefined variable: fileId in
> /home/narvaez/public_html/ddownloadfile.php on line 22
> Could not get file list: You have an error in your SQL syntax near '' at
> line 1
>
> Thanks for any help!.
>
> -----Original Message-----
> From: Sanduhr [mailto:sanduhr@subdimension.com]
> Sent: Wednesday, February 20, 2002 6:58 PM
> To: php-general@lists.php.net
> Subject: [PHP] Re: NULL value for variable
>
>
> that "global $fileId;" shouldn't be there in downloadfile.php
> "Teresa Narvaez" <Teresa.Narvaez@DynCorp.com> schreef in bericht
>
> news:CBED705A7FD2D311865500508B10894103390275@chntex02.is.dyncorp.com...
> : Hello,
> : I am runnig php 4.1.1. In the configuration, register_globals is
> : ON.
> : I have two programs and I want to pass the value from fileId from one.php
> to
> : downloadfile.php. However, in downloadfile.php $fileId is NULL. What am
> I
> : missing? Thanks, -Teresa
> :
> :
> : one.php
> : <td width="33%" bgcolor="#FFDCA8" height="21">
> : <p style="margin-left: 10">
> : <font face="Verdana" size="1">
> : <a href="downloadfile.php?fileId=<?php echo $row["PicNum"];
> ?>" >
> : Download Now
> : </a></font>
> : </td>
> : </tr>
> :
> : downloadfile.php
> : <?
> : global $fileId;
> :
> : if ( ! is_numeric($fileId) )
> : die ("Invalid PictureNumber specified: ($fileId)");
> :
> : ?>
> :
> :
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>