Jump to content

Files with the same name


Silver

Recommended Posts

I\'m making a script which involves people uploading files. Each person will be uploading a file and a picture of the file. Now, if someone comes to upload their file but there\'s already a file with the same name uploaded it mustn\'t be allowed to overwrite.

 

What I need it to do is for the database to automatically allocate an id number or something to the picture and a seperate one for the file, so if a file or picture of the same name is uploaded it would prevent them clashing.

 

The only thing I can think of which may be a problem is the files will be being downloaded, so the original name they were uploaded as (eg Amber.pet) must be restored when they\'re downloaded.

 

Hopefully that made sense! Please explain in a simple way as I\'m still quite a newbie to php :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.