Page 1 of 1

Empty $_FILES when uploading file

Posted: Mon Feb 25, 2008 4:52 pm
by webgal
There has to be some absurdly simple answer to this dilemma that I'm missing but if you all would indulge me and throw a little knowledge my way I'd be grateful. I'm attempting to upload a file. I have set my form enctype to multi-part/form-data but when I submit (method=POST) my $_FILES array is empty. My new ISP tells me there is a 6MB limit on file size with a 60 second timeout. I'm trying to upload a tiny file (120k). Any ideas?

Thanks,

Re: Empty $_FILES when uploading file

Posted: Mon Feb 25, 2008 5:08 pm
by EverLearning
If you wrote this in your code
webgal wrote:multi-part/form-data
then that's the error. It should be

Code: Select all

multipart/form-data
without the dash in 'multipart'.

Re: Empty $_FILES when uploading file

Posted: Mon Feb 25, 2008 5:18 pm
by webgal
Thank you so much. I knew it had to be something really stupid. That works great.

Re: Empty $_FILES when uploading file

Posted: Mon Feb 25, 2008 6:21 pm
by EverLearning
This kind of thing happens to everyone once in a while, no matter how long they've been coding. :)