I have a form to upload 2 files. They can upload one, or just upload both at the same time. When I upload 2 small image files (both under 100kb), they work perfect. But if one file is larger, say around 200kb, it doesn't work. I already set the max value to "100000" in the hidden tag below, so I'm not sure what else I can do to fix this?
<form enctype="multipart/form-data" action="upload.php" method="post">
<b>Image File</b><br />
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
<b>Large Image</b>: <input type="file" name="uploadedfile1" size="30" /><br />
<b>Thumb Image</b>: <input type="file" name="uploadedfile2" size="30" /><br />
<center><input type="submit" name="submit" value="submit" class="button"></center>
</form>
When it's processed, it goes to this php code:
$uploadedfileBase1 = basename($_FILES['uploadedfile1']['name']);
$uploadedfileTemp1 = $_FILES['uploadedfile1']['tmp_name'];
$uploadedfileBase2 = basename($_FILES['uploadedfile2']['name']);
$uploadedfileTemp2 = $_FILES['uploadedfile2']['tmp_name'];
// Large Image
$target_path_large = $target_path . "large/" . $uploadedfileBase1;
if(move_uploaded_file($uploadedfileTemp1, $target_path_large)) {
echo "<p>The <b>large</b> file \"$uploadedfileBase1\" has been uploaded.</p>";
} else{
echo "<p>There was an error uploading the <b>large</b> file <i>$uploadedfileBase1</i>, please try again!</p>";
}
// Thumb Image
$target_path_thumb = $target_path . "thumbs/" . $uploadedfileBase2;
if(move_uploaded_file($uploadedfileTemp2, $target_path_thumb)) {
echo "<p>The <b>thumbnail</b> file \"$uploadedfileBase2\" has been uploaded.</p>";
} else{
echo "<p>There was an error uploading the <b>thumbnail</b> file <i>$uploadedfileBase2</i>, please try again!</p>";
}
Thank you for reading!