Re: Re: Displaying images

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Miller, Terion wrote:
>
>
>
> Does the filename include the path?  Does the image with said filename
> actually exist in that path?
>
> --
> Thanks!
> -Shawn
> http://www.spidean.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> Hmm guess I am confused because the image is being stored in the db.
> So I thought I could call it like any other field data.
>
> Thanks
> Terion
>
>   
Please reply all.

The img tag is used to tell the browser where the image is located, it
then loads the image.  If you have the binary image data in the DB then
you probably need to have a PHP file with a get var as the img src and
then have that PHP file actually output the image data:

<img src="path/to/image.php?filename=<?php echo $row['filename']; ?>">


//image.php
header("Content-type: img/jpeg");
$filename = $_GET['filename'];
//do your SQL select and fetch using filename or whatnot to get the
image data, I assume from 'ePhoto'
echo $row['ePhoto'];

Thanks!
-Shawn

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux