(I dont want to give the url out until the code is completely working and made secure)
$uploaddir = '/files/';
$uploadfile = $uploaddir. $_FILES['file']['name'];
print "<pre>";
if (move_uploaded_file($FILES['file']['tmp_name'], $uploadfile)) {
print "File is valid, and was successfully uploaded. ";
} else {
print "Possible file upload attack! Here's some debugging info:\n";
print_r($FILES);
}
print "</pre>";
The form is:
<FORM action=addfile.php method=post target="" enctype="multipart/form-data">
<DIV align=center> </DIV>
<DIV align=center>Attach the actual file here!</DIV>
<input type="hidden" name="MAX_FILE_SIZE" value="50000">
<DIV align=center></DIV>
<DIV align=center><INPUT type=file name=file></DIV>
<DIV align=center> </DIV></form>