What is the ruling on having an intention (Niyyah) for every prayer?
Praise be to Allah, and peace and blessings be upon our Master, the Messenger of Allah.
Intention (Niyyah) is a pillar (Rukn) without which the prayer is not valid. The worshiper must have an intention for every prayer, meaning they must consciously intend the act of worship they are performing. Its timing must coincide with the opening Takbir (Takbirat al-Ihram). It is not a requirement to utter it verbally; rather, doing so is considered a recommended Sunnah. There are three levels of intention:
1-If the prayer is obligatory (Fard): It is mandatory to include the Intent (to pray), the Specification (which prayer, e.g., 'Asr), and the Obligation (recognizing it as a Fard). For example, one should bring to mind or say: 'I intend to pray the Fard of 'Asr.'
2-If it is a voluntary prayer restricted by a specific time or cause (Sunnah Muqayyadah): It is mandatory to include the Intent and the Specification. For example: 'I intend to pray the Sunnah before Zuhr' or 'I intend to pray Duha.'
3-If it is an absolute voluntary prayer (Nafl Mutlaq): It is sufficient to simply have the Intent to pray. For example: 'I intend to pray.'
And Allah the Exalted knows best.
What is the virtue of Laylat al-Qadr?
It is enough to know its great status that Allah revealed an entire surah about it—Surah Al-Qadr. Moreover, the Quran was first revealed on this night.
Allah says {what means}:
"We have indeed revealed this (Message) in the Night of Power: And what will explain to thee what the night of power is? The Night of Power is better than a thousand months. Therein come down the angels and the Spirit by Allah's permission, on every errand: Peace!... This until the rise of morn!" [Al-Qadr/1-5]
The Prophet ﷺ taught us to observe I‘tikaf in the last ten nights of Ramadan, seeking Laylat al-Qadr. Whoever worships Allah and revives this night will receive the reward of worshiping for a thousand months—excluding Laylat al-Qadr itself.
What is required of one who doubts the number of rakʿāt during prayer?
All praise is due to Allah, and peace and blessings be upon our master the Messenger of Allah ﷺ.
If a person doubts the number of rakʿāt he has prayed, he should build upon the lesser number, as that is what he is certain of. He should then perform the prostration of forgetfulness (sujūd al-sahw) before the final salām at the end of the prayer. ʿAṭāʾ ibn Yasār narrated that the Messenger of Allah ﷺ said: "When any one of you is in doubt during his prayer and does not know whether he has prayed three rakʿāt or four, let him pray one more rakʿah and then perform two prostrations while seated before the salām. If the rakʿah he prayed was a fifth, these two prostrations will make it even; and if it was the fourth, then the two prostrations serve as a humiliation for the devil." (Reported by Abū Dāwūd.)
It is stated in al-Muqaddimah al-Ḥaḍramiyyah — one of the foundational texts of the Shāfiʿī school: "If one doubts whether he has prayed three rakʿāt or four, he is obliged to build upon the lesser number."
However, if such doubt recurs repeatedly and reaches the level of obsessive whispering (waswasah), he should not build upon the lesser number in that case — rather, he should build upon the greater number. And Allah the Almighty knows best.
What is the ruling on praying alone (munfaridan) in a row, and what should I do if I enter the mosque together with another person, and there is only a single gap in the first row with no second row present — should I fill that gap in the first row, or should I stand together with him in a new second row?
All praise is due to Allah, and peace and blessings be upon our master, the Messenger of Allah ﷺ.
If a person enters [the congregation] and finds no space available in the row, it is recommended for him — after making his opening takbīr for the prayer — to gently pull someone from the row in front of him to pray alongside him, provided he senses that this person would be agreeable to it. If that person does not agree, then he prays alone, and there is no dislike attached to his doing so in that case.
If he ends up praying alone [behind the row], it is sunnah for him to stand directly behind the imam. Then, if someone else arrives, that person stands to his right; and whoever comes after them stands to his left — and so on — such that the imam remains centered in the middle of the row. This is done so that everyone attains the reward of congregational prayer.
As for the case where two people enter the prayer together, and there is a gap in the row wide enough for only one person, then the two of them should pray together in a new row [of their own], and whoever arrives after them should fill that original gap. This is because if only one of the two fills the gap, the other would end up praying alone [which is to be avoided when it can easily be prevented].
Al-Khaṭīb ash-Shirbīnī (raḥimahullāh) said in Mughnī al-Muḥtāj (Vol.1/P.494): "If he does not find space, then it is recommended for him, while still standing, to gently pull a single person from the row toward himself after making his opening takbīr — out of caution, so as to avoid the position held by some scholars that a person's prayer standing alone behind the row is not valid.
Az-Zarkashī and others said: this should only be done if it seems he would agree to it; otherwise, he should not pull anyone — indeed, doing so becomes impermissible, out of fear of causing discord (fitnah). It is recommended for the person being pulled to cooperate and agree, so that he may attain the reward of assisting in righteousness and piety (al-birr wat-taqwā). However, he should not pull one of two people [praying together] from the row, since this would cause one of them to end up praying alone. This is why the 'pulling' described here takes place only after the opening takbīr [i.e., once the person doing the pulling has already validly begun his own prayer]."
Accordingly: it is sunnah for you to pray alongside the person praying alone, and then, if someone else arrives afterward, you may go and fill the gap in the original row. And Allah, the Exalted, knows best.