Does it say in the tashahhud “al-salaam ‘ala al-nabiy” or “al-salaamu ‘alayka ayyuha’l-nabiy”?
Question

                It was narrated from Ibn Mas’ood (may Allaah be pleased with him) that he said: During the lifetime of the Prophet (peace and blessings of Allaah be upon him) we used to say in the tashahhud “al-salaamu ‘alayka ayyuha’l-nabiyyu wa rahmat-Allaahi wa barakaatuhu (peace be upon you, O Prophet, and the mercy of Allaah and His blessings)” and after his death we used to say “al-salaamu ‘ala al-nabiy wa rahmat-Allaahi wa barakaatuhu (peace be upon the Prophet and the mercy of Allaah and His blessings).” Is this correct, and should we say that in the tashahhud?.
Praise be to Allah.
    What is prescribed is to say that which the Prophet  
    (peace and blessings of Allaah be upon him) taught to the Sahaabah. He 
    taught them to say: “al-salaamu ‘alayka ayyuha’l-nabiyyu wa 
    rahmat-Allaahi wa barakaatuhu (peace be upon you, O Prophet, and the 
    mercy of Allaah and His blessings)”. So we say what the Prophet  (peace 
    and blessings of Allaah be upon him) taught us and taught the Sahaabah, and 
    he did not tell them “When I die, change it.” He taught it to them when they 
    were travelling and going to far distant lands, and they would say “al-salaamu 
    ‘alayka ayyuha’l-nabiyyu wa rahmat-Allaahi wa barakaatuhu”, i.e., they 
    were praying for him. Saying salaam to him is praying for him, for well 
    being, mercy and blessing. “ayyuha’l-nabiy (O Prophet)” is just 
    referring to him; “ayyuha’l-nabiy (O Prophet)” does not mean calling 
    him, rather they are praying for him. “Al-salaamu ‘alayka (peace be 
    upon you)” means may you be safe, may you granted peace, well being, mercy 
    and blessing from your Lord. It is a du’aa’ or supplication for him  
    (peace and blessings of Allaah be upon him), not calling upon him; rather 
    you are asking Allaah to grant him well being, mercy and blessing. If 
    someone says “al-salaamu ‘ala al-nabiy wa rahmat-Allaahi wa barakaatuhu 
    (peace be upon the Prophet and the mercy of Allaah and His blessings)” there 
    is nothing wrong with it, but it is better to say what the Prophet  
    (peace and blessings of Allaah be upon him) taught the Sahaabah: “al-salaamu 
    ‘alayka ayyuha’l-nabiyyu wa rahmat-Allaahi wa barakaatuhu (peace be upon 
    you, O Prophet, and the mercy of Allaah and His blessings)”. This is what 
    the Prophet  (peace and blessings of Allaah be upon him) taught to his 
    ummah, and he died when that was the case,  (peace and blessings of 
    Allaah be upon him). End quote. 

    Majmoo’ Fataawa Ibn Baaz 
    (28/58). 

    See also the answer to question no.
    34535. 

    and Allaah knows best.