Is it permissible to offer mandatory prayer while sitting?
All perfect praise be to Allah, The Lord of The Worlds, and may His Peace and Blessings be upon our Prophet Muhammad and upon all of his family and companions. Standing up is a pillar in the mandatory prayer and the prayer is not valid without it unless one cannot do it. As for Nafila (supererogatory prayer), one can perform it in the state of sitting even if he/she can stand, but his/her reward is half the reward of the person who prays while standing if he/sh has no legal excuse for such an act. And Allah Knows Best.
What is the ruling on speaking while relieving oneself?
It is disliked for one relieving himself to speak while doing so, except out of necessity. And Allah the Almighty knows best.
What is the ruling on someone who eats or drinks thinking that the sun has set, then realizes that it has not yet set?
Whoever eats or drinks believing that the sun has set, then later discovers that it has not yet set, their fast is invalid, and they must make up that day after Ramadan. It is not permissible to break the fast before confirming sunset—either by seeing it, through personal reasoning, or by relying on the statement of someone trustworthy in their religious commitment.
Is the marriage, which lacks a valid legal contract, a guardian, and a court registration, valid?
It is incumbent that a valid marriage contract be concluded in the presence of a guardian and two trustful witnesses, and it should be registered in the court to protect the rights of the wife. Actually, a valid marriage contract is what differentiates between sound marriage and fornication.