Hi,
i’m trying to make a form with an upload field, i’ve set the max_file_size to 100mb, but it doesn’t seem to work, i can only upload files with a very small size.
form:
[code=html]
<form enctype=”multipart/form-data” method=”POST” action=”insert_to.php”>
<input type=”hidden” name=”MAX_FILE_SIZE” value=”100000″>
Choose a file to upload<br>
<input size=70 name=”cimage” type=”file”>
<input type=”submit” value=”Add new item” name=”addnew”>
php:?
[code=php]
//upload file
$path_to =”images/”;
$file_name =basename($_FILES[‘cimage’][‘name’]);
$file_to =$path_to.$file_name;
$file_temp =$_FILES[‘cimage’][‘tmp_name’];
$res2=move_uploaded_file($file_temp,$file_to);
if($res2) {
echo “<p><strong>Image:</strong><br><br><img border=”0″ src=”$file_to”></p>”;
}
else {
echo ”
There was an error uploading the image, please try again!<br>”;
}
I’ve tried searching for the solution and everyone seems to mention some kind of max file size, but i have no idea how to implement it into the codes ? could someone please help me shed some light?