ذِكْرُ مَا يَقُولُ الْمَرْءُ عِنْدَ دُخُولِ الْمَسْجِدِ يُرِيدُ الصَّلَاةَ
The Mesenger of Allah said: "When anyone of enters the mosque, let him send peace upon the Prophet, then let him say: 'Allahumma aftahli abwaba rahmatik (O Allah, open to me the gates of Your mercy).' And when he leaves, let him send peace upon the Prophet and say: 'Allahumma- simni minash-shaitanir-rajim (O Allah, protect me from the accursed Shaitan).'" (Using translation from Ibn Mājah 773)
عَنْ رَسُولِ اللَّهِ ﷺ قَالَ «إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلْيُسَلِّمْ عَلَى النَّبِيِّ ﷺ وَلْيَقُلِ اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ وَإِذَا خَرَجَ فَلْيُسَلِّمْ عَلَى النَّبِيِّ ﷺ وَلْيَقُلِ اللَّهُمَّ أَجِرْنِي مِنَ الشَّيْطَانِ الرَّجِيمِ»