Hi there i'm trying to display an image on a webpage.

The image's URL is stored in a mysql database.

i just want to output the image to the display via PHP.

Any ideas? Thanks

You have stored the image as some sort of Binary Large Object (BLOB) and want to return it to a browser as a file?

Just want to make sure I understand the problem before I explain how to do this.

If it is only an image URL, you can simply concatenate into an <img> tag after using the mysql query e.g. echo "<img src=\"". $row['image_url'] ."\" alt=\"\" />";

<?php
$query = "SELECT image_url FROM gallery WHERE id = ". mysql_real_escape_string($id); 
	 
$result = mysql_query($query) or die(mysql_error());

$row = mysql_fetch_array($result) or die(mysql_error());

echo "<img src=\"". $row['image_url'] ."\" alt=\"\" />";
?>

Martin5211 is right. If you post some code il be happy to code it in for you.
Hope this helps

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.