I've managed to figure out my code is uploading fine. Unfortunately, it does not download fine. It does download, I think, at least it has the download box & the file does save, but when I open the saved file - it is blank! Here is my code if someone can point out that I'm missing something I'd appreciate it. I feel like banging my head on a wall!!
code in the 'form':
if($directory = opendir('Report'))
{
while(false !== ($file=readdir($directory)))
{ if (!ereg("\.xls",$file))
{
continue;
}
echo "Click to download:  ";
echo "<a href=\"dwnldRpt.php?file_name=$file&file_size=$file_size\">$file</a><br>";
echo $complete;
}
closedir($directory);
}
header("Cache-control: private");
header("Content-Type: application/vnd.ms-excel");
$head="Content-Disposition: attachment; filename=".$file_name."\n";
header($head);
//tried this & the one above: header("Content-Disposition: attachment; filename=$file_name");
header("Content-Description: PHP DOWNLOAD");
header("Content-Length: $file_size");
header("Content-Transfer-Encoding: binary");
readfile($file_name);
Thanks.