if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) {
copy($HTTP_POST_FILES['userfile']['tmp_name'], "place to put your file");
echo "File Sent:<br>" . $userfile_name . " ";
} else {
echo "Error the file was'nt uploaded:" . $HTTP_POST_FILES['userfile']['name'];
don't forget that the file must come with the name 'userfile'