What is the ruling on swallowing phlegm while fasting?
If a fasting person intentionally swallows phlegm, their fast is invalid, as it is possible to avoid it.
However, if they swallow it unintentionally, their fast remains valid.
Phlegm is impure and should be avoided.
Does burping (belching) break the fast?
Burping does not break the fast. However, if anything comes up from the stomach, the fasting person must spit it out and rinse their mouth to cleanse it.
If they swallow it intentionally while being able to expel it, or if they swallow their saliva before rinsing their mouth, their fast is invalidated.
Is it permissible to offer prayer at home, or should it be offered in the mosque?
All perfect praise be to Allah, The Lord of The Worlds. It isn`t preferable for the man to pray at home as praying in the mosque is twenty seven times more rewarding. Therefore, this should motivate him to offer prayers in the mosque. And Allah Knows Best.
What is the ruling if hemorrhoid blood exits after completing ablution?
If this blood is exiting from outside the anus (due to the hemorrhoid protruding), it does not invalidate ablution, because blood exiting from the body from other than the two orifices does not invalidate ablution. If it exits from the anus (meaning from inside it), it invalidates ablution, and one must perform istinja' from it, wash the area of impurity, and repeat the ablution.
However, if this blood exits continuously such that no time remains sufficient for purification and prayer without it flowing, then it takes the ruling of urinary incontinence (sals al-bawl). One then cleanses from it after the time for each prayer enters, performs ablution immediately thereafter, and performs the obligatory prayer immediately. There is no liability upon him after that if something of it flows, and he may pray as many voluntary prayers as he wishes. If he wants to pray another obligatory prayer, he must cleanse himself and perform ablution. And Allah the Almighty knows best.