Guys i need your help again pls... Just refer the code below and this is my explanation: Firstly the user can upload as many files as he want, then that uploaded files will be saved to the database after submit button was clicked. After that, a form will appear with the lists of the files uploaded(displayed in filenames only with links on each of them). If the user clicks to a particular filename, the file associated with that filename will be downloaded by the user. Ex. List of Files 1. First.doc 2. Second.txt 3. three.jpeg 4. four.gif Now, base on the example above, if i click the first.doc, the first.doc will be downloaded. but when i click others, still the first.doc will be downloaded. What should i do with my code below so that it will download the correct file that i clicked? By the way, the uploaded files was saved in an array. [code] <?php for($i=0;$i<count($_GET['id']);$i++){ $id=$_GET['id']; $filename=$_GET['filename']; $filetype=$_GET['filetype']; $filesize=$_GET['filesize']; $filecontent=$_GET['filecontent']; if (isset($id)) { include "include/opendb.php"; $query="SELECT $filename,$filetype,$filesize,$filecontent FROM fileuploads WHERE tracking='$id'"; $result=mysql_query($query) or Die("Error locating file for tracking Number: ".$id." ".mysql_error()); list($addfileName,$addfileType,$addfileSize,$addcontent)=mysql_fetch_array($result); header("Content-Disposition: attachment; filename=$addfileName"); header("Content-length: $addfileSize"); header("Content-type: $addfileType"); echo $addcontent; exit; } } ?> [/code]