here's a form for you to start off with...
<FORM ACTION="<? echo $PHP_SELF; ?>" METHOD="POST" ENCTYPE="multipart/form-data">
<b>File:</b><br>
<INPUT TYPE="hidden" name="task" value="upload">
<INPUT TYPE="FILE" NAME="file">
<br>
<INPUT TYPE="SUBMIT" VALUE="SUBMIT">
</FORM>
on the recieving end you should have these vars set:
echo "name: $file_name<br>\n";
echo "type: $file_type<br>\n";
echo "size: $file_size<br>\n";
...as well as the var $file, which will be the actual file.
with PHP-4.1.x you can directly access the file via the $_FILE auto-global.
You can view the array structure:
print_r($_FILE);
After the file is uploaded, your file will actually only be a temp file and will be destroyed unless you save it.
so you should do:
@copy($file,'/path/to/where/I/want/it/to/go/'.$file_name);
and it will be copied there for you.