Simplest method:
<?php
// if file is uploaded...
if(is_uploaded_file($_FILES["name_in_form"]["tmp_name"]))
{
// ...move it from temporary directory to destination directory
move_uploaded_file($_FILES["filename"]["tmp_name"], "/path/to/file/".$_FILES["filename"]["name"]);
} else {
// ...else an error is returned
echo("upload error");
}
?>
"name_in_form" is the name of the attribute "name" in the your html form