I keep getting the file upload error 2, I know this means the file is bigger than the MAX_FILE_SIZE I set in the HTML form, but it is not. It is only 32kb when I set the MAX_FILE_SIZE value="100000". Why would I get this error? I already checked the upload file size and post upload settings in my php.ini and that is not the problem either.
<form enctype="multipart/form-data" method="post" action="upload_img.php">
<input type="hidden" name="MAX_FILE_SIZE" value="100000"/>
<input type="text" name="name" value=""/>
<input type="file" name="picture" value="picture"/>
<input type="submit" name="submit" value="upload"/>
</form>
Remove this:
<input type="hidden" name="MAX_FILE_SIZE" value="100000"/>
And in input "picture" set empty value:
<input type="file" name="picture" value=""/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With