**when I worked on a simple upload form I found something wrong in the result
first my code was :**
$filename= $_FILES ['file']['name']; $filesize= $_FILES ['file']['size']; $tmpname= $_FILES ['file']['tmp_size']; $filetype= $_FILES ['file']['type']; $folder = "upload/"; if(isset($_POST['do']) and $_POST['do']== 'upload'){ if(empty($filename)){ echo "the file is not exist"; } else if ($filesize > 2048){ echo " the file is biger than 2 MB"; }else{ echo "the file is uploaded"; move_uploaded_file($tmpname, $folder); } } echo " <form action='upload.php' method='post' enctype='multipart/form-data'> file path : <input type='file' name='file'/> <input type='submit' name='do' value='upload'/> </form> " when the file size is less than 2048 the result always be "the file is bigger than 2048" although I'm sure it's less than 2 MB when i makes it 100000 to see the result what would be the result was "the file is uploaded" but I couldn't find the file in the upload folder anyone can help me ? what is the wrong ?