Hello, I have a form where I upload images to my MySQL DB, and they are stored in BLOB format.
I can get the images to display separately through a link to a different page.
Although what I would like to do is have preview of each image on the first page - not sure if this is possible though due to header information.
Any ideas please, or ask if you dont understand.
<table class="sample">
<tr>
<th>Image</th>
<th>Filename</th>
<th>Type</th>
<th>Description</th>
<th>Download/Delete</th>
</tr>
<?php
if ($filelist)
{
while ($f = mysql_fetch_array($filelist))
{
?>
<tr valign="top">
<td>
<?php echo $f['filedata']; ?>
</td>
<td>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?action=view&id=<?php echo $f['id']; ?>">
<?php echo $f['filename']; ?></a>
</td>
<td><?php echo $f['mimetype']; ?></td>
<td><?php echo $f['description']; ?></td>
<td>
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?action=dnld&id=<?php echo $f['id']; ?>">Download</a> |
<a href="<?php echo $_SERVER['PHP_SELF']; ?>?action=del&id=<?php echo $f['id']; ?>" onclick="return confirm('Delete this file?');">Delete</a>
</td>
</tr>
<?php
}
}
else
{
?>
<tr><td colspan="3">No Files!</td></tr>
<?php
}
?>
</table>