Looks like you are running php on a winDoze machine, which may introduce some qirks...
Overall, if you are trying to print the $img and $img_name vars from within your "uploadFile()" function, they should print out correctly as long as you are defining them with the GLOBAL directive. If they are not showing up there, try:
print "$GLOBALS['img_name']";
from within the "uploadFile()" function. If that does print the correct value, then you probably have globals turned off in your configuration file and you will have to access varables using the $GLOBALS[] array.
If you are trying to print those vars from within the "move_uploaded_file()" function and you didn't use the GLOBAL directive in that function as well, then you will get the results you talked about; namely, the $img var will be there (because you explicitly passed it as a parm) but the $img_name would not have a value.
The double slashes are probably because you have "magic quotes" turned on in your configuration file.
You probably should check the location for your "temp" directory as well, because you are indicating that they $img value is on your desktop? Probably not the best place for php to be creating temporary files.
HTH
-- Rich Rijnders
-- Irvine, CA US