I created a file upload script in php. I limit the upload file size by checking the size of the file. Everything works great for files 12M and under. I set the limit to about 5MB, and if I try to upload a file larger than 5 but less then 12 my if statement is executed. If a file is larger than 12MB my if statement is skiped and the code moves on with the else statement.
// start for loop
for($x=0;$x<$uploadNeed;$x++){
$file_name = $FILES['uploadFile'. $x]['name'];
$file_size = $FILES['uploadFile'. $x]["size"];
//echo $file_size . " ";
//12MB = 12582912
if ($file_size > 5000000){
$copyfail = 1;
echo "The file, <b>" . $file_name . "</b>, is above 12MB and cannot be uploaded.<br />Please reduce the file size or select a different file.<br /><br />";
}else{