I have a file input known as 'name=fileImage'. Now I have php code below where it checks to see if file exists in the folder (ImageFiles) or not:
if (file_exists("ImageFiles/" . $_FILES["fileImage"]["name"]))
{
}
My question is that if a file does exist in the folder, how can it be coded so that it still uploads the file but it gives it a different file name. Maybe something like automatically add a number at the end of the filename to give it a different file name?