Praise be to Allah.
There are two signs of purity (i.e., end of the menses) among women:
1.Emission of the white discharge.
2.Cessation of menstrual bleeding, such that if a woman were to insert a piece of cotton or the like, it would come out clean, with no trace of blood or yellowish or brownish discharge.
Some women know that the period has ended from the white discharge, and others do not see the discharge, but complete drying up signals the end of the menses.
The white discharge is something that is like a white thread; it comes from the woman’s vagina at the end of her period, and is a sign that her period has ended and she is now pure.
It was also said that it is the white discharge that is emitted at the end of the period.
See: al-Mawsoo‘ah al-Fiqhiyyah al-Kuwaitiyyah (23/279).
If the menstrual bleeding ceases and the place is dry and free of bleeding, and dries completely, then you have become pure and your menses has ended. After that you should not pay any attention to anything that your body may secrete of yellowish discharge or otherwise, because of the hadith of Umm ‘Atiyyah who said: We used not to regard the brownish or yellowish discharge after the white discharge (that signals the end of the period) as being of any significance
Narrated by Abu Dawood (307); classed as saheeh by Shaykh al-Albaani.
An-Nawawi (may Allah have mercy on him) said: The sign of the end of menses and the beginning of the period of purity is that the bleeding ceases, and yellowish or brownish discharge occurs. When that ends, the woman has become pure regardless of whether or not any white discharge is emitted after that.
End quote from al-Majmoo‘ (2/562)
The scholars of the Standing Committee (4/206) were asked:
After the end of her period, a woman sees a colour that is somewhat brownish, in the form of small spots and in a small quantity, without seeing any sign of menses, and this may go on for two or more days. What does she have to do, and can she pray and fast? Or should she wait until she sees that she has become pure from dryness or the usual sign?
If a woman has become pure following her period, then she sees – after having become pure with the sign of dryness or the white discharge – some secretions, she should not regard that as menses. Rather it comes under the same ruling as urine; she has to clean herself from it (instinja’) and do wudoo’ as prescribed. This is something that happens to many women. She should carry on as she usually dies when she is pure, praying and fasting Ramadan. It is narrated in a saheeh report from Umm ‘Atiyyah (may Allah be pleased with her) that she said: We used not to regard the yellowish or brownish discharge after the white discharge (that signals the end of the period) as being of any significance. Narrated by Abu Dawood with a saheeh isnaad. It was also narrated by al-Bukhaari, without the words “after the white discharge (that signals the end of the period).” End quote.
It also says in Fataawa al-Lajnah ad-Daa’imah (4/222 vol. 2): We know that the end of the menses is signalled by two things: dryness first of all, or the white discharge. My problem is that I see the dryness, then after a few days I see the white discharge. And sometimes I see the white discharge, then after that I see a brownish or yellowish discharge. They replied: If the menstruating woman sees that her period has completely ended and she does ghusl, then she should not pay any attention to whatever happens after that of brownish or yellowish discharge, because of the words of Umm ‘Atiyyah (may Allah be pleased with her) that she said: We used not to regard the brownish or yellowish discharge after the white discharge (that signals the end of the period) as being of any significance. End quote.
But if the yellowish or brownish discharge is directly connected or comes directly after the menstrual bleeding, the woman should not hasten to do ghusl, because the yellowish discharge that is connected to the bleeding is a sign that the period has not yet ended. Hence Umm ‘Atiyyah said: after the white discharge (that signals the end of the period). This indicates that the yellowish and brownish discharge before the end of the period has been established has an impact, because it indicates that the period has not yet ended.
With regard to waiting for fifteen days, this applies to one who has not seen either of the two signs of purity or the end of the menses mentioned above, rather her bleeding continues. In this case she should wait for fifteen days, then purify herself and pray and fast, according to the majority of fuqaha’.
However before that, when she sees that her period has ended, she should purify herself and pray and fast, as mentioned above.
Please see: al-Mughni by Ibn Qudaamah (1/214); see also the answer to question no. 95421
With regard to making up the prayers that you missed, you are excused due to your being unaware of the shar‘i ruling, especially since you asked a shaykh or mufti, and he gave you a fatwa. This reinforces your excuse, even though what you did or what he said in his fatwa was in fact incorrect.
For more information, please see the answer to question no. 45885
What we advise you to do is not pay attention to a great deal of waswaas or doubts, because that may spoil your acts of worship and make your life difficult. Moreover, if you open that door it will never end and will not be limited to any particular situation; rather if you give free rein to doubts concerning one thing, the Shaytaan will instil in you doubts concerning others.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: If a person has a lot of doubts, to such an extent that he cannot do anything without doubting it – if he does wudoo’ he has doubts, if he prays he has doubts, if he fasts he has doubts – this too should be ignored, because this is a kind of sickness and a problem. Our discussion here is addressed to healthy people who is free of sickness, and the one who is suffering from waswaas is mentally unstable, so his case is not included here.
End quote from ash-Sharh al-Mumti‘ (3/379)
We ask Allah to make things easy for you and to heal you from this problem.
And Allah knows best.