“Notice: Undefined index”, but index appears to be defined

html page:

<form method="POST" action="Database/action.php">
    <input type="file" name="select_build" id="select_build" class="form-control">
    <input type="Submit" name="upload_build" class="form-control">

action page :

else if(isset($_POST['upload_build']))  //UPLOAD REQUEST
    if(empty($file_name)){ echo "empty"; //echo displays

As you can see, the key select_build was defined, but I don’t understand why the undefined index error is triggered.

Your form requires the enctype="multipart/form-data" attribute, to handle file uploads.