Re: Re: Displaying images
| From: | Miller, Terion | Date: | Thu, 28 May 2009 19:06:14 +0000 |
| Subject: | Re: Re: Displaying images | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-293318@lists.php.net to get a copy of this message | ||
Well I have tried Numerous scripts and ways and still can't get the image to display.
I have echoed the file and have been able to get the gibberish image code to display but not a real
image, here is my full code if anyone wants to have a look, I am going crossed eyed here.
These are just a few of the ways I have been trying to get the img tag to work on my output.php
page:
<tr> <td>Scout Photo:</td> <td>
<a href="image.php?filename=<?php echo$row['photoName'];
?>"><?php echo$row['photoName']; ?></A><br>
<?php echo "\n<br>Scout Photo : "."<img
src=\image.php?filename=" .$row['photoName']. "\">"; ?>
<?php echo "<img
src=\"image.php?filename=".$row['photoName']."\">\n"; ?>
<?php echo "<img
src=\"image.php?id=".$row['ePID']."\">\n"; ?>
<img src="image2.php?filename=<?php echo $row['photoName'];
?>">
Here is one way I was trying to get to work for the image.php page where the headers are supposed to
work and don't
include("inc/dbconn_open.php");
error_reporting(E_ALL);
//if (isset($_FILES['ePhoto'])){$ePhoto = $_FILES['ePhoto'];} else {$ePhoto
="";}
$filename = $_GET['$filename'];
$image = stripslashes($_REQUEST[photoName]);
$sql = "SELECT ePhoto, photoName, photoType from eagleProjects WHERE photoName =
$filename";
$result=mysql_query($sql);
$data = mysql_fetch_array ($result);
$type = $data['photoType'];
$name = $data['photoName'];
header("Content-type: $type");
header("Content-Disposition: attachment; filename=$name");
echo $data["photoName"];
echo $data["ePhoto"];
exit;