When a person goes to a musjid, he should enter with his right foot and
say;
Du`a On Entering Musjid:
ALLAHUM-MAFTAHLI ABWABA RAMATIK
O Allah! Open for me the door of your Mercy
When a person is inside the musjid, he should remember that he is in the house of Allah SWT, which must be given its due respect. Therefore, he should sit quietly and keep himself busy in salaah, remembrance of Allah SWT and recitation of the Qur'an. He should avoid raising his voice, indulging in vain talk or argument with others. According to a Hadith, a person who sits in the musjid waiting for the next salaah, is like the one who is performing the salaah.
While leaving the musjid, one should take out the left foot first and say;
Du`a For Exiting Musjid:
ALLAHUMMA INNI AS'ALUKA MIN FALDLIKA WA RAHMATIK
O Allah! I beg Thee of Thy bounty, favour & your Mercy