Re: Re: Displaying images

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

 




Thanks for the suggestions everyone, I have this now, but still no image showing up

It is stored as a blob in the database.

on the output page I am calling it like this:

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

Then on the image.php page I have this:

<?php
include("inc/dbconn_open.php");
error_reporting(E_ALL);

//image.php
header("Content-type: img/jpeg");
$filename = $_GET['filename'];

$sql = "SELECT ePhoto from eagleProjects WHERE $filename= ePhoto";
$result=mysql_query($sql);
$row = mysql_fetch_assoc ($result);



?>

<?php echo $row['ePhoto']; ?>

This page isn't working and if I try to browse this page it wants to open it with an editor, it won't view in the browser.

What am I doing wrong? Is it the code or the data?

Thanks
Terion

-- 
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