I can't believe uploading files could be so easy. But then again, the script is three years old. Here it is, adapted a bit.
Part 1:
Code: Select all
<form action="upload.php" method="post" ENCTYPE="multipart/form- data">
<input type="file" size=40 name="file"><br>
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
<input type="submit" value="upload">
</form>Code: Select all
<?
if ($file == "none") {
print "You must specify a file to upload";
}
else {
copy($file, "$DOCUMENT_ROOT/uploads/newfolder/$file_name");
unlink($file);
}
?>Is it really that simple, or should you be doing something else as well?