Pain during sex

Has anyone ever experienced painful intercourse? I've been with my fiancé for 5 years and just recently began experiencing painful intercourse with him. It feels like a burning sensation more than anything. And there have been times where I'm spotting afterwards. I feel sore after too. I'm not sure what this burning feeling is, however I have recently also had period that followed with yeast infection symptoms. When I went to the doctor she said I had some bacteria and gave me a prescription. Bacteria is gone but sex still hurts. Any one else have this happen before?