Reputation: 15
I work in a PHP - HTML project, and I want to upload some files into a directory. The problem is that the code works fine, and I checked it for *.doc, *pdf, *.txt file types. However, I need to upload videos as well. When I try to do so, the upload is unsuccessful. What can I do? Is is a matter of file size? I tried to upload videos of size about 5Mb and the problem remains: After using var_dump() I understood that in the nextForm the $_POST['submit'] condition is false.
<form action='nextForm.php' method = 'post' enctype= 'multipart/form-data' >
file: <input type='file' name = 'upload' >
<p> <br> </p>
<input type='submit' name = 'submit' value ='upload it!' >
</form>
Upvotes: 1
Views: 1371
Reputation: 397
You need to set the value of upload_max_filesize and post_max_size in your php.ini .
; Maximum allowed size for uploaded files.
upload_max_filesize = 40M
; Must be greater than or equal to upload_max_filesize
post_max_size = 40M
Upvotes: 1