I have a question about the $_FILES global variable in php. When I do a print_r on my files array I get a blank array() 1 displayed (but I have uploaded one file with post from a form on another page). The post variable for upload (upload being the input type = file name) is set to the filename but nothing in Files is set and if I try and call $_FILES[‘upload’][‘name’] nothing shows up. What could be causing this? When I submit my form I have a bunch of different fields (text boxes, select boxes, checkboxes, etc.) but that shouldn’t effect my file upload right?
Thanks!
Make sure your form tag has the
enctype=multipart/form-dataattribute set: