Hi all
the problem i am facing is different, i am trying to display images form database,i m giving code that i wrote
when i use the above code then the result come with whole bineary charactred,but the number of images shown are correct all 5 images are shown.
but if i remove the comment header statement then nothing happens
but just message is dispaly as below
"http://localhost/.../gallery.php"
I am confused wats happening
plz help me wat can be the problem. as the header statement is very important but if i uncommnet it above message come and if i comment it then every thing comes ok but it shows whole binary data insted of image.
so plz correct my code if u can
or any one has simple code as i am using BLOB datatype and images are getting uploaded properly in database.
thanks
in advance
the help will be really appriciated as i am unable to find solution since long time
the problem i am facing is different, i am trying to display images form database,i m giving code that i wrote
Code:
$sql = "select * from upload ";
$result = mysqli_query($link,$sql) or die ("Could not access DB: " . mysqli_error());
echo "<table border=1>";
while ($row = mysqli_fetch_array($result))
{
//header("content-type: image/jpeg");
echo $row['name'] . "<br /> <br /><br />";
echo $row['content'];
//echo "<img src=\"images/". $row['content'] . "\" alt=\"\" /> <br /></td></tr>";
//echo "</p>";
//echo "</div>";
}
echo"</table>";
but if i remove the comment header statement then nothing happens
but just message is dispaly as below
"http://localhost/.../gallery.php"
I am confused wats happening
plz help me wat can be the problem. as the header statement is very important but if i uncommnet it above message come and if i comment it then every thing comes ok but it shows whole binary data insted of image.
so plz correct my code if u can
or any one has simple code as i am using BLOB datatype and images are getting uploaded properly in database.
thanks
in advance
the help will be really appriciated as i am unable to find solution since long time
Comment