Ti ringrazio ho risolto.
Questo è il codice:
$query = "SELECT DatiBinari, Nom, Type FROM allegato_det WHERE od = '" . $_GET["od"] . "'";
$select = @mysql_query($query) or die("Query fallita !");
$result = @mysql_fetch_array($select);
$data = $result["DatiBinari"];
$nom = $result["Nom"];
$type = $result["Type"];
// SE IL BROWSER È INTERNET EXPLORER
if(ereg("MSIE ([0-9].[0-9]{1,2})", $_SERVER["HTTP_USER_AGENT"])) {
header("Content-Type: application/octetstream");
header("Content-Disposition: inline; filename=$nom");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: public");
} else {
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=$nom");
header("Expires: 0");
header("Pragma: no-cache");
}
echo $data;
Questa è la parte di codice, che mi scrive il nome:
header("Content-Disposition: inline; filename=$nom");
Saluti.