Hello, Thanks for your replies.  I still cannot access the variable fileId
:-(.  I would appreatiate any more comments.  Thanks in advance -Teresa 

Warning: Undefined index: fileId in
/home/narvaez/public_html/ddownloadfile.php on line 6
Warning: Undefined variable: fileId in
/home/narvaez/public_html/ddownloadfile.php on line 7
Warning: Undefined variable: fileId in
/home/narvaez/public_html/ddownloadfile.php on line 8
Invalid PictureNumber specified: ()

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
------------------------
       <?
       print_r ($_REQUEST['fileId']);
       if ( ! is_numeric($fileId) )
          die ("Invalid PictureNumber specified: ($fileId)");
       ?>


> -----Original Message-----
> From: Lars Torben Wilson [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, February 21, 2002 1:52 PM
> To:   Andrey Hristov
> Cc:   Narvaez, Teresa; [EMAIL PROTECTED]
> Subject:      Re: [PHP] Re: NULL value for variable
> 
> On Thu, 2002-02-21 at 08:16, Andrey Hristov wrote:
> > 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
> 
> Turning error_reporting() off while developing is probably one of the
> easiest ways to make your life suck--but to each his own. :) In this
> case, it's probably pointing right to the problem.
> 
> What do you get from using 'print_r($_REQUEST)'? You should be able
> to access $_REQUEST['fileId'];
> 
> 
> Torben
> 
> > ----- Original Message -----
> > From: "Narvaez, Teresa" <[EMAIL PROTECTED]>
> > To: "'Sanduhr'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > 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:[EMAIL PROTECTED]]
> > > Sent: Wednesday, February 20, 2002 6:58 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] Re: NULL value for variable
> > >
> > >
> > > that "global $fileId;" shouldn't be there in  downloadfile.php
> > > "Teresa Narvaez" <[EMAIL PROTECTED]> schreef in bericht
> > >
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > : 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
> > >
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> -- 
>  Torben Wilson <[EMAIL PROTECTED]>
>  http://www.thebuttlesschaps.com
>  http://www.hybrid17.com
>  http://www.inflatableeye.com
>  +1.604.709.0506

Reply via email to