sorrowsfemme wrote in php

Listens: Emergence - The Vigil

Files. Yay.

I was working with 2 versions of a program one that utilized register_globals = on another written for register_globals = off. I turned them off so I could see both. Now the problem is that when I use the file input tag (its an upload script) Its not picking up the variable.
IE

if(!isset($_FILES['userfile']))
upload_failed("Document was not found", "No data was uploaded.");

It keeps triggering the error.

However if it were to say:

if(!isset($userfile))
upload_failed("Document was not found", "No data was uploaded.");

It will work.
I have also tried it with register_globals = off to see what happens. In that case neither works. I would really rather leave register_globals = off. If I turn register_globals = on then I could probably make it work but it would be insecure and also I would have to re-write several pages of code.

Please help.
--------------- Edit -----------------------
It was requested so here is a full example. I get no results at all with this.
<form action="#" method="post">
<table border="0" cellpadding="4" cellspacing="0" width="800">

<tr>
<td><b>File:</b></td>
<td><nput type="file" name="userfile"><br><font class="desc">Click browse to select a file</td>
<tr>
<td align="center" colspan="2"><input type="submit" value="Upload this document"></td>
</tr>
</table>
</form>

<?
//phpinfo()
echo "$userfile<br>\n";
$us = $_FILES['userfile'];
echo "$us\n";
?>