if (move_uploaded_file($tmp_name, $uploadfile)) { //do some code if file properly moved }else { echo "File could not be successfully moved!<br>"; }