Sleep? It's like 2:15 in the afternoon in my world. Where you from mang?
About the names to use, here's a quick and dirty tutorial (which will probably confuse you further. haha):
1) You have an input set to type="file" in your form... has a browse button, etc. You give this input a name, we'll use "myfile" in this example.
2) When you click the submit button the file that was selected in the input field gets uploaded to the server temp dir (either the default for the system, or specified in the php.ini file).
3) Now, you have a superglobal called $FILES. (I assume you know all about superglobals, i.e. $POST, $_SERVER, etc.). This array contains all of the info about your file (or files). More specifically, it contains 5 bits of info about the file: the original name of the file, the mime type (jpeg, gif, etc), file size, the temp file name (important!), and error. You call each of these like this:
$FILES['myfile']['name']
$FILES['myfile']['type']
$FILES['myfile']['size']
$FILES['myfile']['tmp_name']
$_FILES['myfile']['error']
4) Now you can use move_uploaded_file() to do just as it says. You need to specify the tmp_name as the first param and the path/name as the second param.
So, here is a quick and dirty script that follows these principles, and should upload a file:
echo("<form action=\"$_SERVER[PHP_SELF]\" method=\"post\" enctype=\"multipart/form-data\">");
echo("<input type=\"file\" name=\"myfile\"><input type=\"submit\"></form>");
if ($_SERVER[REQUEST_METHOD] == "POST") {
$filename = $_FILES['myfile']['name'];
$temp_filename = $_FILES['myfile']['tmp_name'];
$upload = move_uploaded_file($temp_filename, $filename);
if($upload) {
echo("The file was uploaded.");
}
else{
echo("There was a problem.");
}
}
Beware, that code is untested... it should work though.