File upload along with data and apply proper validation in PHP
File : <form method="post" action="save-file.php" enctype="multipart/form-data"> <input name="file" type="file" /> <input name="submit" type="submit" /> </form> save-file.php if(isset($_POST['submit'])){ if((isset($_FILES['file']['name'])){ $errors = array(); $file_name = $_FILES['file']['name']; $file_size = $_FILES['file']['size']; $file_tmp = $_FILES['file']['tmp_name']; $file_type = $_FILES['file']['type']; $ext = explode('.', $file_name); $file_ext = end($ext); $extensions = array('pptx', 'PPTX','pdf', 'PDF', 'ppt', 'PPT', 'docx', 'DOCX'); if(in_array($file_ext, $extensions) === FALSE){ $errors[] = "This extension file is not all...