<?php
require('../../_admin_/config.php');
mysql_connect($host,$user,$pass); //Kopler til SQL
mysql_select_db($db);
$filesize = filesize("../../upload-fil/".$_POST[filnavn]);
header ("Content-type: octet/stream");
header ("Content-disposition: attachement; filename=".$_POST[originalfilnavn].";");
header("Content-Length: ".$filesize);
readfile("../../upload-fil/".$_POST[filnavn]);
exit();
?>
When using this, It doesn't automtically store the file extension.
Bengt