Can someone advise me what I'm doing wrong here. Once submitted all I keep getting is the "No file specified" or "Could not copy file"
I have Register_Globals = Off
#The HTML file "uploader.html
<html><head><title>File Uploader</title></head>
<body>
Select a file to Upload:<br/>
<form action="uploader.php" method="post" enctype="multipart/form-data">
<input type="file" name="file" size="50">
<br/>
<input type="submit" value="Upload File">
</body>
</html>
#The PHP file "uploader.php"
<?php
$filename = $FILES['file']['name'];
$filesize = $FILES['file']['size'];
$filetype = $FILES['file']['type'];
$file = $POST['file'];
if($filename != "" ){
copy("$file", "E:\Program Files\Apache Group\Apache2\htdocs\$filename")
or die("Could not copy file");
}else{
die("No file specified");
}
?>
<html><head><title>Upload Complete</title></head>
<body>
<h3>File Upload Succeeded...</h3>
<ul>
<li>Sent: <?php echo($filename); ?>
<li>Size: <?php echo($filesize); ?>
<li>Type: <?php echo($filetype); ?>
</ul>
<a href="<?php echo($filename); ?>">Click here to view file</a>
</body>
</html>
Many thanks.