can you all slap me wake? what is going on?? the first part works, then I do exactly the same, but in a function and that gives errors... going for some more coffee...
<xmp>Start of code:
<body>
<?
$file_dir= "D:/temp";
if (isset( $fupload ) ) {
echo $fupload;
copy ( $fupload, "$file_dir/$fupload_name") or die ("Could not copy");
echo "Upload OK!";
} else { print "
<h1>Upload Form</h1>
<form enctype=multipart/form-data action=upload.php method=post>
<input type=file name=fupload><br>
<input type=submit value=\"Send File\">
</form> ";
}
function upload($fupload) {
$file_dir= "D:/temp";
if (isset( $fupload ) ) {
echo $fupload;
copy ( $fupload, "$file_dir/$fupload_name") or die ("Could not copy");
echo "Upload OK!";
}
}
upload($fupload);
?>
</body>
end code</xmp>