I needed a file uploader for a client a little while ago, then the client didn't want it, so I'll share with all of you. I know I hated coding it, it was confusing (for me anyway), but I made it fairly simple to use: function uploader($num_of_uploads=1, $file_types_array=array("txt"), $max_file_size=1048576, $upload_dir=""){ if(!is_numeric($max_file_size)){ $max_file_size = 1048576; } if(!isset($_POST["submitted"])){ $form = "