i did as you said but it still does not work. here is the cording that i add in upload.php file before close the ftp connection:-
// upload the file
//$upload = ftp_put($conn_id,$destination_file,$source_file,FTP_ASCII );
if (move_uploaded_file($source_file, "/home/admin")) {
print "Received {$_FILES['file']['name']} - its size is {$_FILES['file']['size']}";
} else {
print "Upload failed!";
}