Hi There Everyone.
Could anyone assist me in the correct method of displaying images from my mysql db. I want to display multiple images on my page.
This is the code I have. I got this from a post from DaniWeb. Hope I did the code tags correctly.
<?php
require 'library/config.php';
require 'library/opendb.php';
?>
<?php
header('Content-type: image/JPG');
@mysql_connect($dbhost, $dbuser, $dbpass) or die("Can not connect to database: ".mysql_error());
@mysql_select_db($dbstore) or die("Can not select the database: ".mysql_error());
$query = mysql_query("SELECT id, type, content FROM upload");
while($row = mysql_fetch_array($query)){
print $row['content'];
}
?>
Thanks allot.