thanks - works great.
one other problem. here is the code i am using to upload the files with, it works perfectly and does everything that i need it to do. the only problem is, the file that is uploaded for some reason becomes owned by the server, therefore i cannot edit if necessary. do i need to do something different in my code to solve that or is it not possible?
many thanks
<?php
//copy the file into the relevant directory
$path = "/inet/www.avonvalley.fordingbridge.org/html/uploads/$type/$filename_name";
if ($filename_name != ""){
copy("$filename", "$path")or
die("Couldn't copy file.");
} else {
die("<center>No input file specified.<BR></center>");
}
//log the file in the text file for that directory
$log = "/inet/www.avonvalley.fordingbridge.org/html/uploads/$type/$type.txt";
$file_text = $filename_name."|".$text_input."\n";
$fp = fopen ($log, "a");
fwrite ($fp, $file_text);
fclose ($fp);
//send email to admin
$adminemail = "richard.ward@fordingbridge.com";
$msg = "File Name: $filename_name\nFile Type: $type : $filename_type\nFile Destination: $path\nFile Size: $filename_size\nFile Data: $text_input\n";
$to = "$adminemail";
$subject = "$type has been uploaded";
mail($to, $subject, $msg);
//print message to user
print "<CENTER>";
print "<div align=center><b><u>Uploaded to $sitename </u></b>";
print "<table border=\"1\" width=\"90%\" id=\"table1\">";
print " <tr>";
print " <td>Name of File:</td>";
print " <td>$filename_name</td>";
print " <td>File Size:</td>";
print " <td>$filename_size bytes</td>";
print " </tr>";
print " <tr>";
print " <td>Type of File:</td>";
print " <td>$filename_type</td>";
print " <td>Into Folder</td>";
print " <td>$type</td>";
print " </tr>";
print "</table>";
print " <b>Your file and Information has been uploaded and emailed to the Site Administrator.</b>";
print "<p><input type=\"button\" value=\"Close Window\" onClick=\"window.close()\"><BR></font></p>";
print "</CENTER></div>";
?>