I am unable to rename a pre uploaded image, say "file1.jpg", when uploading another file with the same name.
I am saving both files in a folder named "uploads" on the server's root folder. Thus, I need to rename the previous file name to something other and then save the new file as "file1.jpg". I have no idea about how to do this in PHP. Please, provide any hints or code if possible.