File Upload and Overwrite

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tolputt-craig
Forum Newbie
Posts: 5
Joined: Mon Apr 07, 2008 9:32 am

File Upload and Overwrite

Post by tolputt-craig »

Hey Guys,

Im slowly learning php but i am really stuck on something....

I have some code that uploads files with a browse button which works fine but i want to be able to upload a file with the same name which overwirtes the old files...

Can this be done if so any ideas where to get the script from?

Cheers

Craig
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: File Upload and Overwrite

Post by aceconcepts »

I do believe that if a duplicate file is uploaded to the same directory then it overwrites the older one by default.

Here's a pretty handy tutorial for beginners: http://www.tizag.com/phpT/fileupload.php
tolputt-craig
Forum Newbie
Posts: 5
Joined: Mon Apr 07, 2008 9:32 am

Re: File Upload and Overwrite

Post by tolputt-craig »

ok cool, ill have a go.

Cheers
Post Reply