File type validation in PHP safeguards against malicious uploads We looked at file uploading in the previous article and used the minimum amount of steps to accomplish it. This time around, let’s see some other functionality that may be present in the process upload script. If you haven’t done so, read my article on the basics of file uploading. https://blog.devgenius.io/php-p77-basics-of-file-uploading-ba377da3d072 Recap We have a basic HTML form and a simple process script. <form action=”./upload.php” method=”post” enctype=”multipart/form-data”> <div> Select file to upload: </div> <div> <input type=”file” name=”file_name” id=”file_name”> </div> <div> <input type=”submit” name=”submit” value=”Upload”> </div> </form> <?php $target_file = “uploads/” .