Bad title, but I didn't know how to word it...
Anyway, from a page on my site you can upload tutorials which can be any file type. The file and the file type is stored in a MySql database. Later, users can go to "getfile.php?id=[file_id]" to download the file. I use code not unlike this:
header("Content-type: $type");
echo $data;
That works all fine and dandy, but the problem I am having is that when the download window comes up, it acts as if the file is an unknown type, so when you save it, it tries to save it as a PHP file. The file I tested with was a DLL, so how can I make it use .dll file extension instead of .php? Can I change the default file name or something through the headers?