uploads work sometimes
| From: | Tyler Longren | Date: | Thu, 11 Jul 2002 19:27:08 +0000 |
| Subject: | uploads work sometimes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-107215@lists.php.net to get a copy of this message | ||
Hi,
I have a form:
<input type=file name=pdfFile>
And the code that processes the form:
if ($_FILES['pdfFile']['name'] == "") {
print "You must select a file to upload";
}
else {
// code to add data to db
}
This works on my server at home (when I select a file to upload, it sees
the filename in $_FILES['pdfFile']['name'], but on a server at work,
it's blank so I see the error "You must select a file to upload".
Any ideas on why this might happen? Is there anything in php.ini that
could be wrong (it works here at home when register_globals is set to on
or off)?
Thanks everyone,
Tyler