I am trying to display the name of the uploaded file below the input button. The default text should say "No File Uploaded", once the file is selected and added to the server "file_name.ext was uploaded".
Here is my code at the moment:
<label for='upload' class='upload-button'></label><input type='file' name="fileAttach" class='upload-button' id='upload'/><br>Upload Site List
<?php
if (isset($_FILES['fileAttach']['name'])) {
echo "File is attached.";
}
?>
This code is on the form page using POST with enctype multipart/form-data.
My knowledge is below the entry level, so I'm sorry if this is really simple question. All the info I found so far did not help.
$_FILES['fileAttach']['name']
and the echo command it shouldn't be too hard to writeecho $_FILES['fileAttach']['name'];