if(file_exists($folder_name.$file_name)) { $counter = ""; do { $counter=$counter+1; $file_name=$counter."".$file_name; } while(file_exists($folder_name.

$file_name)); } $move = move_uploaded_file($_FILES['file']['tmp_name'],$folder_n ame.$file_name); if(!$move) { echo "File isn't uploaded"; return false; } else{ echo "File is uploaded into server"; return true; }

Sign up to vote on this title
UsefulNot useful