PHP driving me up the wall. What's wrong with this code?...

This code…



<form enctype="multipart/form-data" method="POST" action="<?=$_SERVER['PHP_SELF']?>" >
<input type="file" id="userfile" name="userfile">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input type="submit" name="submit">
</form>


If I display the contents of POST…



echo "<pre>".  print_r($_POST) . "</pre>";

I get this…

Array
(
[MAX_FILE_SIZE] => 1000000
[submit] => Submit Query
)
*
It’s like it’s not bothering to remember the contents of ‘userfile’.

What the hell is happening. I’m tearing my hair out. I’ve tried messing about with the code in all kinds of different ways. It just won’t remember the file name.

Disregard. Apparently the filename doesn’t go in POST, it goes somewhere else.

I thought it wasn’t working because elsewhere I was checking isset(_POST['userfile']) when I should have been checking isset(_POST[‘submit’])