CloudBreaker Posted July 21, 2015 Share Posted July 21, 2015 All files are uploading fine...however, on line 8 for $error_array I get that "undefined index" notice. Any ideas on how to get rid of it? Thanks, CB <?php if(Isset($_FILES['file_array'])) { $name_array = $_FILES['file_array']['name']; $tmp_name_array = $_FILES['file_array']['tmp_name']; $type_array = $_FILES['file_array']['type']; $size_array = $_FILES['file_array']['size']; $error_array = $_FILES['file']['error']; for($i = 0; $i < count($tmp_name_array); $i++){ if(move_uploaded_file($tmp_name_array[$i], "test_uploads/".$name_array[$i])){ echo $name_array[$i]." upload is complete<br>"; } else { echo "move_uploaded_file function failed for ".$name_array[$i]."<br>"; } } } ?> Link to comment https://forums.phpfreaks.com/topic/297394-just-one-undefined-index-in-file-upload-array/ Share on other sites More sharing options...
requinix Posted July 21, 2015 Share Posted July 21, 2015 Why does it say "file" when the others say "file_array"? Two seconds. Link to comment https://forums.phpfreaks.com/topic/297394-just-one-undefined-index-in-file-upload-array/#findComment-1516896 Share on other sites More sharing options...
CloudBreaker Posted July 21, 2015 Author Share Posted July 21, 2015 Why does it say "file" when the others say "file_array"? Two seconds. F-Me...why didn't I see that. I need to go to bed. Thanks requinix. CB Link to comment https://forums.phpfreaks.com/topic/297394-just-one-undefined-index-in-file-upload-array/#findComment-1516897 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.