Here i have written a small code…in this looping is not done..only first image is displaying..Actually there are 7 images…Please help me on this
<?php
$username = "root";
$password = "root";
$host = "localhost";
$database = "test";
error_reporting(E_ERROR | E_PARSE);
mysql_connect($host, $username, $password) or die("Can not connect to database: ".mysql_error());
mysql_select_db($database) or die("Can not select the database: ".mysql_error());
header('Content-type: image/jpg');
$query = mysql_query("SELECT * FROM tbl_images");
while($row = mysql_fetch_array($query))
{
echo $content = $row['image']."</br>";
echo $content;
}
?>
try this: