Upload a photo with a unique name using PHP
// Return if no file has been submitted
        if (!isset($_FILES['photo'])) {
            return;
        }

        // Checks if image has been submitted
        if (isset($_FILES['photo'])) {



The last line there is redundant.  The first if has already done the complementary check.  You don't need a second if.  At that point, you can just run the code, as it will always run.  


                $error_message = $_FILES['file_upload']['error'];
                $errors[] = $upload_errors[$error_message];



The $errors array holds error messages.  The $error_message variable holds an error type or error code.  It should probably be named in accordance with that.  Of course, you don't actually need a variable at all, since you never use it again.  You could just say 

                $errors[] = $upload_errors[$_FILES['file_upload']['error']];