Avoid milk, cheese, and other dairy products (except yogurt, unless you don't usually tolerate it well) while you have diarrhea as well as for one to three weeks after it stops. The small intestine, where milk is digested, is affected by diarrhea and simply won't work as well for a while.
Just as it stimulates your nervous system, caffeine jump-starts your intestines. And that's the last thing you need when you have diarrhea. High concentrations of sugar can also increase diarrhea. The sugar in fruit can do the same.
Lastly, steer clear of greasy or high-fiber foods. These are harder for your gut to handle right now. It needs foods that are kinder and gentler such as soup, gelatin, rice, noodles, bananas, potatoes, toast, cooked carrots, soda crackers, and skinless white-meat chicken.