Treatment will depend on the underlying cause of your ulcer. If tests show that you have an H. pylori infection, your doctor will prescribe a combination of medication, which you will have to take for up to two weeks. The medications include antibiotics to help kill infections, and proton pump inhibitors (PPIs) to help reduce stomach acid.
You may experience minor side effects like diarrhea or upset stomach from antibiotic regimens. If these side effects cause significant discomfort or don’t get better
over time, talk to your doctor.