Suppongo che il tuo errore sia dovuto a $nome=GIAN PIETRO che dovrebbe essere scritto invece $nome="GIAN PIETRO";

Al resto ti è già stato risposto.