Hi, I am new to this website and also to php. I am programing in php and MySQL from past 2 months and strive to be a better programmer.
I have created a website on my computer and it is meant to be a online file uploader.
The basic idea is that the users are able to upload various files on my website, after uploading,my site gives back the url as to where it is stored.
This approach is fine if the names of the files are different.
but then when it comes to two users trying to upload two different files but having same name and extension then there is a problem.
So to fix this there should be a unique random prefix and then the file name. This random prefix should not be used again.
I am now stuck as to how to generate this random number prefix.