I am having a problem with accessing the $_FILES array. I find that it sometimes has data in, and sometimes is empty! (I have to submit the first file, go back, submit again....several times, and then will get data) I am running Apache locally, and have checked the php settings for max file size, upload allowed, global variables etc., as recommended in the articles I've found on this. My code is in two php files as given below. PLEASE can somebody help. upload.php html> <head></head> <body> <form enctype="multipart/form-data" method="post" action="upload2.php" > <input type="file" name="newname"> <input type="submit"> </form> </body> </html> upload2.php html> <head></head> <body> <?php echo '<br> Files contains: name :'.$_FILES['newname']['name'].' temp :'.$_FILES['newname']['tmp_name'].' type :'.$_FILES['newname']['type'].' size :'.$_FILES['newname']['size'].' error :'.$_FILES['newname']['error'].'<br>'; ?> </body> </html>