<?php
    if (isset($_POST["submit"])) // check if a file has been submitted and if it is an image
    {
        $dir = "uploads/"; // directory where files are going
        $file = $dir . basename($_FILES["file_uploaded"]["name"]); // file's path and name uploaded
        
        $size = $_FILES["file_uploaded"]["size"];
   
       if ($size > 800000) // check if the size above 800 kb
       {
           echo "File is too big";
       }
       else {
           // ... check type, ..., UPLOAD
       }
   }
?>