Código
if($_FILES) { $filename = $_FILES['filename']['name']; $filetype = $_FILES['filename']['type']; $filesize = $_FILES['filename']['size']; switch ($filetype) { case 'image/jpeg': $filetype = "jpg"; break; case 'image/png': $filetype = "png"; break; default: $filetype = ""; } if($filetype == "") { } if ($filesize > 400000) { } echo "Imagen $filename: <img src='$filename' />"; }