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>"; } } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/297394-just-one-undefined-index-in-file-upload-array/ Share on other sites More sharing options...
Solution requinix Posted July 21, 2015 Solution Share Posted July 21, 2015 Why does it say "file" when the others say "file_array"? Two seconds. Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.