Form.php:
<FORM NAME="uploadfile" METHOD="post" ACTION="upload.php" enctype="multipart/form-data">
File: <INPUT TYPE="file" NAME="file"> <INPUT TYPE="submit" NAME="submit" VALUE="Upload">
</FORM>
Upload.php:
<?
if (isset($submit)) {
foreach ($_FILES as $file) {
if (move_uploaded_file($file['tmp_name'], "/path/to/upload/dir/".$file['name'])) {
echo "File Uploaded!";
}
else
{
echo "File Upload Failed";
}
}
}
?>
Note: I just threw this together in about 30 seconds. Just an example of what you're looking at roughly - I don't suggest copy and pasting this and using it live. Obviously you'll want some more security checking and stuff.