intrivious
Programmer
Is there anything obviously wrong with this code? My form field is named 'file'. Whenever I try to upload a file, it fails.
Thanks in advance
Code:
$SUB_DIR = "/email_list/";
$FILE = $SUB_DIR . basename($HTTP_POST_FILES['file']['name']);
if (move_uploaded_file($HTTP_POST_FILES['file']['tmp_name'], $FILE)) {
echo "<font color=green><b>File uploaded</b></font>";
} else {
echo "<font color=red><b>File not uploaded.</b></font>";
}
Thanks in advance