I\'ve a submit discussion form with image upload in my website. Now, I want to upload a unique file name when the user submits their image so that I can show the result of a
I think the simplest way would be to store the image name in a database field and then when the user is uploading their image to validate that the file name is unique by checking it against existing filenames. You can use an ajax / jquery interface if you don't want the user to have to wait til the form has been submitted to get an error or prompt to change their filename.