okay, i have a database "db_house" with a table "flat" and in this table there is a few rows with all the needed info and including 3 images i want to be displayed when this info is displayed. but i have no idea how, i got it right to display one image at a time. but i want all three to be displayed at the same time, meaning on the same page.
i have this to display the image, but how am i gonna have all three show :
Code: Select all
<?php
if(isset($_GET['id']))
{
// if id is set then get the file with the id from database
include 'connection.php';
$id = $_GET['id'];
$query = "SELECT filename, type, size, content " .
"FROM flat WHERE id = '$id'";
$image = mysql_query($query) or die('Error, query failed');
list($filename, $type, $size, $content) = mysql_fetch_array($image);
header("Content-length: $size");
header("Content-type: $type");
header("Content-Disposition: attachment; filename=$filename");
echo $content;
}
?>
Code: Select all
<img src='image.php?id=$id' width='300' height='250' />
i got it right to upload the images to the mysql database, but yes...its just displaying it on the output page thats not working.