Code:
$newname = dirname(__FILE__).'/upload'.$myvar;
$newcopy = dirname(__FILE__).'/copy'.$today.$myvar;
//Check if the file with the same name is already exists on the server
if (!file_exists($newname)) {
//Attempt to move the uploaded file to it's new place
if ((move_uploaded_file($_FILES['uploaded_file']['tmp_name'],$newname)))