Re: Re: Displaying images

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

 





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;

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