Trasforma la riga in questa:

fwrite($fr, "Ecco i tuoi dati attuali User: $nome , Password: $cognome \r\n");

buon lavoro