Hi,
I'm having the file DownAtt.php which contains:
<?
$db=mysql_connect("127.0.0.1","root");
mysql_select_db("mydb",$db);
$sqlAtt="SELECT Content,Filename FROM att WHERE id=$AttID";
$rowAtt=mysql_fetch_array(mysql_query($sqlAtt));
$FileSize=strlen($rowAtt[Content]);
$FileName=$rowAtt[Filename];
header("Content-type: application/x-octet-stream; name=$Filename");
header("Content-lenght: $FileSize");
header("Content-disposition: attachment; filename=$FileName");
echo $rowAtt[Content];
?>
This file is called with the link DownAtt.php?id=x, where x is the id of the filename stored in a mysql longblob. All works well, except download managers which are not automatically launched and if manually launched, the saved filename is DownAtt.php and not the $Filename. The standard download window displays the correct filename and filesize.
Somehow, the header which outputs the filename does not trick the download manager which gets the original filename DownAtt.php.
Thanks for any hints