Can anyone tell me why my files aren't uploading? I'm just trying to upload a file, then copy the temp to a user directory, and it's not working, here is the full code:
The variable $user is just the username that is logged in, and yes that directory is created.
<?php
if ($action=="do") {
$move_path = "C:\Server\files\" . $user;
if (is_uploaded_file($FILES['userfile']['tmp_upload'
])) {
move_uploaded_file($FILES['userfile']['tmp_upl
oad'], $move_path) or die("Cannot Upload File");
}
echo "$move_path<BR />";
echo $_FILES['userfile']['tmp_name'];
}
?>
<FORM ACTION="index.php" METHOD="POST" ENCTYPE="multipart/form-data">
<INPUT TYPE="HIDDEN" NAME="location" VALUE="file.doupload">
<INPUT TYPE="HIDDEN" NAME="action" VALUE="do">
Filename:<BR />
<INPUT TYPE="FILE" NAME="userfile">
<BR /><BR />
<INPUT TYPE="SUBMIT" VALUE="Upload File">
</FORM>