...

View Full Version : preview from ddb



zodehala
02-25-2012, 09:41 PM
after upload image into mysql db i ca download it like following



while($row = $result->fetch_assoc()) {
echo "
<tr>
<td><img src=\"#\"/></td>
<td>{$row['name']}</td>
<td>{$row['mime']}</td>
<td>{$row['size']}</td>
<td>{$row['created']}</td>
<td><a href='get_file.php?id={$row['id']}'>Download</a></td>
</tr>";
}


how can i preview them ?

chose
02-26-2012, 12:54 AM
may it work with gd2



$img =imagecreatefromjpeg(path_to_img);
header('Content-Type: image/jpeg');
imagejpeg($image);

zodehala
02-26-2012, 12:28 PM
may it work with gd2



$img =imagecreatefromjpeg(path_to_img);
header('Content-Type: image/jpeg');
imagejpeg($image);



it gives broken image error

litebearer
02-26-2012, 01:03 PM
Look at answer #1 and adapt it
http://stackoverflow.com/questions/5753928/how-to-display-multiple-images-blob-from-mysql-using-php



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum