Retrieve images from database not shown in firefox.

  • asad_black
  • Graduate
  • Graduate
  • asad_black
  • Posts: 129
  • Loc: pakistan

Post 3+ Months Ago

Header("Content-type: image/jpeg");
$var = @$_GET['q'] ;
$trimmed = trim($var);
$con = mysql_connect("localhost","sample","sample");
if (!$con)
die('Could not connect: ' . mysql_error());
mysql_select_db("sample", $con);
$sql = mysql_query("SELECT * FROM links");

while($row = mysql_fetch_array($sql))
echo $row['title'];
echo "<center><img height='200' width='200' src='".$row['image']."'></img><br><br><br></center>";
//echo "<img src='".$row['imgdata']."'>";
echo $row['link'];
echo "<br />";

its work correctly on IE but in fire fox it shows the path of the PHP file...!

Output in firefox = http://localhost/mywork/asad_black/view_records.php

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 42 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.