I'd like to open a file from browser, to be later uploaded to ftp. My code works on localhost, but when I test it on my domain, it writes "There's no file selected", but right after selecting the file, without submitting the form it displays that I've selected my file. I could really use some help. I just want to print the name of the selected file after submitting the form. Here is the code:

```
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Upload test</title>
  </head>
  <body>
    <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
      <input type="file" name="file" id="file">
      <input type="submit" name="upl" value="Upload">
    </form>
  </body>
</html>
<?php
    if(isset($_POST['upl'])){
        echo "Name: ".$_FILE['file']['name'];
     }
  ?>

```

Thanks in advance!