I can't seem to get any data stored in $FILES I checked in my ini file, and file upload is turned on. However, when I upload a file, and try to output anything stored in one of the $FILES indexes, there is nothing there.
did you remember to put the enctype="multipart/form-data" in your form tag?
Yes, I did. My form looks like this: <form enctype="multipart/form-data" action="upload.php" method="post"> <input type="hidden" name="Max_File_Size" value="30000000"> Upload: <input name="userfile" type="file"> <input type="submit" value="Upload File"> </form>
do a simple test:
<?php if (!isset($_POST['submit'])) { echo ' <form action="" method="POST" enctype="multipart/form-data"> file: <input type="file" name="userfile"><br> <input type="submit" name="submit" value="submit"> </form> '; } else { print_r($_FILES); } ?>
Okay. The if statement executed and did not make it to the else. This must mean the file never made it to $_POST ?
Is file_uploads turned on in php.ini?
Yes, I've checked my ini file, and file uploads is turned on.