CodeIgniter Forums
Upload library error message - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Upload library error message (/thread-3335.html)



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

[eluser]xwero[/eluser]
Hello,

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

[eluser]cereal[/eluser]
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:

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

Bye Wink