Ok, I am very confused by your thoughts here. I have changed the page significantly to try and make it easier to read.
Now I don't get any errors, or mesages of any sort. By the way, it doesn't work.
-Tim
<?
if(isset($upload)){
if ($file=="none"){
echo "You must specify a file to upload";
}else{
$formats = array('mp3','exe');
if(in_array(strtolower(substr($file_name,-3)),$formats)) {
echo "<font face=\"verdana,arial,helvetica\" size=\"2\" color=\"#000000\"><b>Sorry! MP3's and .EXE's are disallowed!</b></font>";
}else{
copy($file, "$file_name");
unlink($file);
echo "<font face=\"verdana,arial,helvetica\" size=\"2\" color=\"#000000\"><b>File Uploaded Successfully to <b>$username</b> directory!</b></font>";
}
}
}
?>
<table border="0" width="80%" cellspacing="5" cellpadding="5">
<form action="<?=$PHP_SELF;?>" method="post" enctype="multipart/form-data">
<tr>
<td><font color="#000000" face="verdana" size="2">File</font></td>
<td><input type="file" size="40" name="file"></td>
</tr>
<tr>
<td colspan="2"><input type="hidden" name="MAX_FILE_SIZE" value="100000">
<input type="submit" name="upload" value="Upload"></td>
</tr>
</form>
</table>