fetch_assoc()){ if(getfiletype($dl['downloadfile'])=="jpg"){ $ctype="images/jpeg"; } if(getfiletype($dl['downloadfile'])=="doc"){ $ctype="application/msword"; } if(getfiletype($dl['downloadfile'])=="pdf"){ $ctype="application/pdf"; } if(getfiletype($dl['downloadfile'])=="xls"){ $ctype="application/vnd.ms-excel"; } header('Content-type: '.$ctype.'\n'); header('Content-Disposition: attachment; filename="'.basename($dl['downloadfile']).'"'); readfile('neofiles/'.$sType.'/'.$dl['downloadfile'].''); } } ?>