Well, it's very easy! You know, when a file is uploaded, it goes to a temporary directory, and if you want it, of course after checking it and seeing that it meets some certain conditions, you should move it to your own directory, or it'll be deleted after some times ( I really do not know when, but it won't be there if you do not copy it where you want b4 you close your page). So, after uploading a file, you have this array: $_FILES. So, if the name of your form field was "myFile", then you get these indexes too:
$FILES["myFile"]["tmp_name"]
$FILES["myFile"]["name"]
$FILES["myFile"]["size"]
$FILES["myFile"]["error"]
And maybe some other indexes, but I only use what I listed. You might ask what is the difference between the "tmp_name" and "name". "tmp_name" is a name that your file has under that temporary dir, and it's something like "php0" or "php1" and so on. So, basically it's useless! If you need that file, you have to move it to your own directory, that should also be chmoded to 777, means you can write into it. So, if that directory is called "oopse", you should write:
move( $_FILES["myFile"]["tmp_name"], "oopse/" . $_FILES["myFile"]["name"] );
So, you see that you can put a new name for your file, but if you wana keep the same name, you should use $_FILES["myFile"]["name"] that holds the original name of the file when it's uploaded. But if you wana change it, you can put whatever you like instead of it. Don't forget to set the extension too for the latter!
Hope that it helped