After having sex I bled like I was on my period for only a few hours and then stopped it's been 4days since then and I've been having brown discharge?

Post-coital bleeding. Bleeding after sex is called post-coital bleeding and can be caused by cervicitis, cervical polyps, abnormal cervical cells, and STDS. The blood that stays in your vagina afterward results in the brown discharge. If this happens again it would be a good idea to see your PCP or GYN for an exam and testing. Hope this helps.