if(file_exists($uploaddir.'/'.$FILES['file']['name']))
{
rename($uploaddir.'/'.$FILES['file']['name'],$uploaddir.'/'.$date.'.png');
} else {
print "File rename failed!";}
The rename works, but the part that doesn't is the $date variable. I included $date=$_GET['date']; at the beginning, so what else could I be doing wrong?