Thanks for posting your query.
You are probably having symptoms of fissure in ano
A clinical examination may have to be done for confirmation.
Take high fiber diet, fiber supplements and drink lot of fluids.
Your doctor may prescribe topical medication
like diltiact for relief. Sitz bath should also be done for good relief.