path at the bottom of the browser window! I don't want that!
If this is the only reason you store files in a database, then lets get familiar with htaccess folder protection and send the files from you file system by readfile php function.
If you insist that you want to pull down these files from a blob field,
lets say, you creeate 2 links in your profile page after login
<a href="download.php?file=1">Download my attachment 1</a>
<a href="download.php?file=2">Download my attachment 2</a>
In download.php
<?php
session_start();
if ( empty( $_SESSION["userid"] ) )
die( "You have to log in first..." );
if ( isset( $_GET["file"] ) )
{
$fieldnames = array( 1 => "pdf_field" , 2 => "DOC_field" );
if ( in_array( $_GET["file"] , $fieldnames) )
{
$f = $fieldnames[$_GET["file"]];
$sql = sprintf( "select %s FROM tablaname WHERE userid=%d" , $f , $_SESSION["userid"] );
echo $sql; // test in phpmyadmin
/* Here you can fetch the result and make it output to download
see: php.net for readfile() mysql_fetch_assoc() mysql_error() and header()
*/
}
else
die( "invalid field name!" );
}
?>
in_array()
mysql_fetch_assoc()
readfile()