Jump to content

downloading file (BLOB) from database


joebudden

Recommended Posts

i have displayed a list of files in my database ...

but now i want the user to be able to download a file using a simple hyper link .....

this is my code so far ..........

while (list($artefactId,$filename,$type,$size) = mysql_fetch_array($sql))
{
print '<table width="50%" border="1" cellspacing="0" cellpadding="0">';
print '<tr><td width="50%"><div align="right">Artefact Id:</div></td>';
print '<td width="50%">' . $artefactId . '</td></tr>';
print '<tr><td width="50%"><div align="right">Name:</div></td>';
print '<td width="50%">' . $filename . '</td></tr>';
print '<tr><td width="50%"><div align="right">Type:</div></td>';
print '<td width="50%">' . $type . '</td></tr>';
print '<tr><td width="50%"><div align="right">Size:</div></td>';
print '<td width="50%">' . $size /1024 . " KB" . '</td></tr>';
print '<tr><td width="50%"><div align="right">Download:</div></td>';
print '<td width="50%">';
?>
<a href="view.php?id=<?=$artefactId;?>"><?=$filename;?></a><br>
<?php
print '</td></tr>';
print '<tr>';
print '<td width="50%"><div align="right">';
?>

what do i need to do next ???? any ideas please


Link to comment
https://forums.phpfreaks.com/topic/31369-downloading-file-blob-from-database/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.