Things Which Invalidates Prayers For Forty Days
Drinking Alcohol:
His prayers will not be accepted for forty days. It was narrated that ‘Abd-Allaah ibn ‘Amr said: The Messenger of Allaah (peace and blessings of Allaah be upon him) said:
“Whoever drinks alcohol and gets drunk, his prayers will not be accepted for forty days, and if he dies he will go to Hell, but if he repents, Allaah will accept his repentance. If he drinks wine again and gets drunk, his prayer will not be accepted for forty days, and if he dies he will go to Hell, but if he repents, Allaah will accept his repentance. If he drinks wine again and gets drunk, his prayer will not be accepted for forty days, and if he dies he will go to Hell, but if he repents, Allaah will accept his repentance. If he does that again, Allaah will give him to drink of the mud of khabaal on the Day of Resurrection.” They said, “O Messenger of Allaah, what is the mud of khabaal?” He said, “The juice of the people of Hell.” Narrated by Ibn Maajah, 3377; classed as saheeh by al-Albaani in Saheeh Ibn Maajah, 2722.
The fact that his prayers are not accepted does not mean that the person’s prayers are invalid, or that he should give up prayer. Rather what it means is that he will not be rewarded for them. So the purpose of his prayer is to fulfil his duty and to avoid the punishment for not praying.
More
Approaching A Fortune Teller:
"The Salaah (daily prayer) of whoever approaches a fortune-teller and asks him about anything will not be accepted for forty days and nights." [Reported by Hafsah and collected by Muslim in Sahih Muslim (English Trans.), vol. 4, p. 1211, no. 5440).]
Not only is the practice of astrology Haraam but also visiting an astrologist and listening to his predictions, buying books on astrology or reading one’s horoscope are also forbidden! Since astrology is mainly used for predicting the future, those who practice it are considered fortune-tellers. Consequently, one who seeks his horoscope comes under the ruling contained in the Prophet (sallallahu `alayhi wa sallam) above statement.
If, however, one believes in the predictions of their horoscope, whether spoken by an astrologist or written in books of astrology, he falls directly into Kufr (disbelief) as stated by the Prophet (sallallahu `alayhi wa sallam)
"Whoever approaches an oracle or fortune-teller and believes in what he says, has disbelieved in what was revealed to Muhammad." [Reported by Abu Hurayrah and collected by Ahmad and Abu Daawood (Sunan Abu Dawud (English Trans.), vol. 3, p. 1095, no. 3895).]
More