I want to do something like the following. That is I am trying to crate a function that allows me to grab the temp file name of an uploaded file, however I am having trouble with the syntax. I am also confused whether $HTTP_POST_VARS are "global" in scope or not. The function I wrote below does not return the file name in the variable, and when I try to add a line to make $HTTP_POST_VARS variable available as a global scope, it chokes on the syntax. I even tried a line that passed the $HTTP_POST_VARS variable in by reference with an ampersand but that returned nothing.
The question here then realy is how do I grab the value of $HTTP_POST_FILES['userfile']['tmp_name']; from WITHIN a user defined function. Any help as usual would be most appreciated. Thanks in advance.
function grab_userfile_name()
{
$userfile_name = $HTTP_POST_FILES['userfile']['tmp_name'];
echo"\n<br> userfile name: $userfile_name";
}
grab_userfile_name();