the form itself needs to have an enctype attribute like this..
<FORM ACTION="upload.php" ENCTYPE="multipart/form-data">
to specify max size,
<INPUT TYPE=HIDDEN NAME=MAX_FILE_SIZE VALUE=1024>
(apparently)
to check the extension use normal string handling on the $filename or whatever it's called.
to copy it wherever try
<?
if (copy($filename, "c:\junk\$filename.txt")) {
/ this has worked /
else {
/ this failed /
}
?>