My obgyn put me on a birth control pill to stop pain caused by endometriosis. I have recently been dizzy & brown discharg coming out for almost 2 week?

Complicated. Brown discharge is old blood that is leaving the uterus and generally not an infection. Ocps can help with the symptoms of endometriosis in some cases, and in others are less helpful. In some cases, laparoscopy with resection of endometriosis implants is required to get lasting relieve from symptoms.
Breakthrough bleedin. It is not unusual to have irregular spotting when starting birth control pills. This usually resolves after a few months. The dizziness is not typical and if this doesn't clear soon, i would recommend evaluation by your primary care doctor.
Sorry. He did a right thing, but it may not be the best of treatments in your case. Oral contraceptives usually help, but if your problem is severe, you may need something else. Occasionally, Mirena (levonorgestrel) iud works for some, whereas for other, you will need more aggressive therapy to treat that.