Hi, I have a contest where people can upload a picture to win a prize. The problem is, if two people post an image called "image.jpg", the newer post (I think) overwrites the older post.
I'm running a validation function to prevent images that are too large or too small here:
On lines 27 and 28, I added a random number to the front of the file name, but I don't think it's working--even though when I look in the upload directory, I see the random number. Can you please tell me how to prevent duplicate files from being uploaded to the server? Thanks,
Ben