The present invention is related to in situ gelling buccal pharmaceutical formulations suitable for use in the treatment of mouth diseases such as oral candidiasis or aphtha. Particularly, the current invention is related to in situ gelling formulations applied via buccal route, comprising nystatin, a corticosteroid and at least one local anaesthetic. The formulations provided according to the present invention provide covering substantially all oral cavity when they are sprayed into the mouth by means of polymers gelling at body temperature and adhering to oral mucosa by means of mucoadhesive polymers, providing the active agent in an improved and effective way for treatment of the diseases stated above.