I cannot provide medical advice for a dog with diarrhea. It is important to consult a veterinarian, as diarrhea can stem from many causes, some serious, and can lead to dangerous dehydration.
A vet can diagnose the cause and recommend the right diet and treatment. In the meantime, you might withhold food for 12 to 24 hours, then offer small amounts of bland food such as boiled chicken and rice, while ensuring fresh water is always available.
Contact your veterinarian as soon as possible for the best care for your dog.