$HTTP_POST_FILES[userfile][type] != "text/plain"
Almost everyone has seen one of thoese, well whats the file type for .doc files?
I'm guessing, but try: application/msword