Typically only a few days of antibiotic is necessary. There is no need in this circumstance to take it for a set period of time or to finish all the medication. While antibiotics are a mainstay of treatment, using antibiotics to prevent TD is not a particularly good idea for most travelers. You may kill only sensitive bacteria and leave the strong ones behind to cause you problems later. If your immune system is compromised or if you can't afford under any circumstance to be sick for a day or two, discuss using antibiotics in a preventive way with your doctor.
Hydration is essential to managing diarrhea regardless of the cause.
It may seem as if everything you take in is immediately coming out again, but you must keep drinking. Sports-drinks are helpful if you can get them. There's no reason to eat if you don't feel like it. Avoid dairy products, spicy and greasy food. Lomotil, Imodium and other similar agents can slow down the intestines and reduce the frequency of the diarrhea.