Why dont you just change the filename of the file when the is uploaded. When you upload a file, info about that file is contained on the $FILES array. for example you have an input field of type "file" which is named "pcfile". on the $FILES array
$_FILES['pcfile'] contains for members
$FILES['pcfile']['name'] -> true filename of the file
$FILES['pcfile']['tmp_name'] --> path to the tmp file on the server
...
...
The other info you dont need
when you upload file to a directory on the webroot you need to copy the tmp_file to the directory on the web root or whatever by running
copy ( $FILES['pcfile']['tmp_name'], '/path/to/file/'.$FILES['name'].date("Ydm", time());
im not really sure of the indexes of the $_FILES['pcfile'] array to be sure make a test php script that contains only the following
while(list($key, $value) = each($_FILES['pcfile']))
{
echo $key.': '.$value;
}
this will echo the indexes and the values of those indexes of $_FILES['pcfile'] array