I created a filename reader in php that read the files from a folder,now I want to add a function that aloud me to download this file through the webreader, and let me choose wherever I want to save itI really dont know whats the problem with the script. any one with an idea ?This is what I have at the moment. index.php\[code\]<?php$mydir = "images/";if ($handle = opendir($mydir)) { while (false !== ($file = readdir($handle))) { if ($file != '.' && $file != '..') {?> <a href="http://stackoverflow.com/questions/10562815/download.php?f=<?php echo $file ?>" target="_blank"><?php echo $file ?></a><?php } } closedir($handle);}?>\[/code\]download.php\[code\]<?php $filename = $_GET['f'];// set this to the path where your zipped files are located$filepath = "images" . $filename;// a little securityif(strpos($filename, '..') !== false || realpath($filepath) != $filepath) die();if (file_exists($filepath)){ // make sure the browser knows what it's getting, and what to do with it header('Cache-Control: public'); header('Content-Type: application/zip'); header('Content-Disposition: attachment; filename=' . $filename); readfile($filepath); die(); } else { die('Error: File not found.');}?>\[/code\]