hi all, i have the following code in a script whereby i send the filename to be downloaded. there is something that´s not working properly depending on the web browser (and probably the Operating system). now im working on php4,postrgesql,apache2 an mandrake 10 with Konqueror as my web browser. these are the scenarios: 1) when i call the page that is supposed to allow me to download the file i selected, with konqueror on the localhost, it works fine and on other mandrake - konqueror clients too. 2)when i do the same with an internet explorer on winxp the save as dialog comes up and when i choose the directory, the file that is actually downloaded is an html with only a few bytes. 3) when i deactivate the last line, readfile("$filename" ), on internet explorer with winxp, the internet explorer tries to open the file and show the contents in the browser. on mandrake with konqueror what happens is that it tries to download the file but says that connection was lost. any help would be highly appreciated!! thanx. if (isset($_POST['select'])) { $sel=$_POST['select']; $filename = "$sel"; $size = filesize($filename); header("Pragma: no-cache"); header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); header("Expires: 0"); header("Content-Transfer-Encoding: binary"); header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=$filename"); header("Content-Length: $size"); readfile("$filename"); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php