check file selected in php

Solutions on MaxInterview for check file selected in php by the best coders in the world

showing results for - "check file selected in php"
Henri
25 Jan 2017
1if(!isset($_FILES['file_upload']) || $_FILES['file_upload']['error'] == UPLOAD_ERR_NO_FILE) {
2    echo "Error no file selected"; 
3} else {
4    print_r($_FILES);
5}