First of all it is necessary to note that the Muslim has to protect his fast from things that may invalidate it, and he has to seek reward by giving up his desires for food, drink and intercourse, as Allah says in the Hadith Qudsi concerning the virtues of fasting: “He gives up his food, his drink and his physical desires for My sake.” (Reported by al-Bukhari)
Regarding the difference between mani (in men, semen) and madhi (in men, prostatic fluid), Sheikh M. S. Al-Munajjid, a prominent Saudi Muslim lecturer and author, states: “Mani in the case of men is a thick, white liquid, and in the case of women it is thin and yellow. (The word mani refers to the fluid secreted by either male or female at the time of orgasm.)
Imam al-Nawawi said: ‘The scholars stated: when a man is healthy, his semen is white and thick, and gushes out in spurts accompanied by feelings of pleasure. After it has come out, it is followed immediately by a feeling of being drained and exhausted.’
Madhi, on the other hand, is a sticky white fluid that is emitted when a person is thinking of or desiring intercourse. Its emission is not accompanied by feelings of pleasure, it does not gush out in spurts, and it is not followed by exhaustion. This may happen to men and women alike, although it is more common among women.”
As regards the effect of the emission of madhi on fast, Sheikh Al-Munajjid, states: “Madhi (in men, prostatic fluid) does not invalidate the fast, according to the more correct of the two scholarly views, because the basic principle is that the fast remains valid, and because it is too difficult to avoid.”
In the Kuwaiti Encyclopedia of Islamic Jurisprudence, it is stated:
“If a person releases madhi due to frequent gazing (at women), his fast is not invalidated, according to the apparent words of Imam Ahmad, as there is no proof that the emission of madhi invalidates fast. Also, it cannot be compared to semen (mani) by analogy since they have different rulings and therefore the basic ruling is that the fast remains valid.”