Hi,
Here the code I use to to a file upload.
uploadfile.php File:
<?
$path = "your path here";
if (is_uploaded_file($userfile)) {
$upload_path = "$path/".$userfile_name;
echo $upload_path;
if (file_exists($upload_path)){
print("<b> Can't create file 'File exists'</b>");
}else{
copy($userfile, $upload_path);
echo "<B> File upload ok</B>";
}
}
?>
HTML File:
<FORM ENCTYPE="multipart/form-data" ACTION="uploadfile.php" METHOD=POST>
File : <INPUT NAME="userfile" TYPE="file" size="30"><br>
<br>
<input type="SUBMIT" VALUE="Upload File">
<input type="RESET" VALUE="RESET FORM"><br>
<br>
</form>
this code works for me.
Hope this can help you
cu