CodeIgniter Forums
Upload library error message - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Upload library error message (/thread-3335.html)

Upload library error message - El Forum - 09-25-2007


It's a little bug but it confused me for a while.

I got the message : Unable to find a post variable called userfile.
The error was that i didn't add the enctype="multipart/form-data" but i was looking in the post array and there was the userfile present.

Maybe the error message could be changed to : Unable to find a files variable called userfile. Which is also more accurate.

Upload library error message - El Forum - 11-05-2007

I don't know if you solved, but this happens because your script starts before you send something through the form, just write a little rule like this in your view page:

<?php echo ($_SERVER['REQUEST_METHOD'] == 'POST') ? $error : NULL; ?>

Bye Wink