very easy file uploading question

I have a very basic file uploading script, as you can see it will always rename the uploaded file to the same name, its meant to be that way. However, I want it to overwrite the old file when a new one is uploaded. Now it always ignores the request because the file is allready there. How would this be accomplished?

<?PHP $target = "upload/verkoopcijfers.mht"; if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) { echo "Het bestand is succesvol geupload."; } else { echo "Er was een onverwacht probleem tijdens het uploaden van het bestand, probeer het aub opnieuw."; } ?>

Nevermind, I’ll unlink before request.

Sponsor our Newsletter | Privacy Policy | Terms of Service