Newbie here,
trying to prevent image files from being overwritten because of existing image file with the same name being present.
How can I do this?
Your help is much apprecated!
if(file_exists('/www/uploads/'.$uploadfile_name)) die('Duplicate File!'); else { // do your upload thing... // stuff like move upload..etc. }
Thanks LxGhak,
That function works great. I mofied it a little to do what I needed:
if (file_exists('images/'.$uploadfile_name)){ $uploadedfile_name=("1".$uploadedfile_name); }
much appreciated!