Look carefully at the changes i've done here, especially at "$move_path" and "MAX_FILE_SIZE"!
<?php
if ($_POST["action"]=="do") {
// if $user is in the form "dir/"
$move_path = "C:/Server/Apache/htdocs/files/".$user.$_FILES['userfile']['name'];
// or also:
// $move_path = "C:\\Server\\Apache\\htdocs\\files\\".$user.$_FILES['userfile']['name'];
if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {
copy($_FILES['userfile']['tmp_name'], "$move_path") or die("dead");
}
}
?>
<form enctype="multipart/form-data" action="fileUpload2.php" method="post">
<INPUT TYPE="HIDDEN" NAME="location" VALUE="files.upload">
<INPUT TYPE="HIDDEN" NAME="action" VALUE="do">
<input type="hidden" name="MAX_FILE_SIZE" value="5000000">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>