Fmdpa Posted January 15, 2012 Share Posted January 15, 2012 The further I go into web development, the stranger the problems I encounter get. My latest brain twister involves an empty $_FILES array. I have never encountered this problem before. When I submit the form, no matter how I do it, the $_FILES array returns empty. Here's my form: <form action="" enctype="multipart/fom-data" method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="700000" /> <input type="file" name="avatar_file" required="required" /> <input type="submit" value="Upload & Stamp!" /></form> I've done a clean install of PHP and Apache, yet the problem persists. My $_POST array looks like this: Array ( [MAX_FILE_SIZE] => 700000 [avatar_file] => cyberstream-avatar.png ) I'm confused because most problems with an empty $_FILES array are because the form enctype is incorrectly set (or not set at all). This problem just started randomly (It could have been when I was modifying an httpd.conf or php.ini file, but then the clean installation should have fixed it). It hasn't stopped since. Link to comment Share on other sites More sharing options...
Ingolme Posted January 15, 2012 Share Posted January 15, 2012 You misspelled "multipart/form-data" Link to comment Share on other sites More sharing options...
Fmdpa Posted January 15, 2012 Author Share Posted January 15, 2012 DUH! One face for each hour I spent trying to figure out this problem...and all for that one missing letter. I can't believe it.... :fool: :fool: :fool: :fool: Link to comment Share on other sites More sharing options...
Fmdpa Posted January 15, 2012 Author Share Posted January 15, 2012 BTW, thank you Ingolme! I was so overcome with "I can't believe that stumped me that long" that I forgot to express my gratitude. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.