Hello
Welcome to health care magic.
Constipation in children may be due to faulty bowel or eating habits.
Abdominal pain may be due to retained stools getting more harder.
If there is pain at anus while passing stools,it may indicate some pathology at rectum or anus.In this case,you need to visit paediatric/
general surgeon immediately.
If I were your treating doctor ,I would recommend,
-
Stool softener like docusate 1-2 tsps at bed time for 3 successive nights.
-Include more of high fibre food like fruits mostly apples and bananas,green leafy vegetables,bran like oats and whole grain cereals,raisins.
-Adequate intake of water.
-Making a habit for child to go to toilet whenever urge is felt.Encourage emptying bowels at specific time everyday.
-If symptoms persists,or there is severe abdominal pain or
vomiting,immediately consult a paediatrician.
Hope this information helps.
Feel free to ask any more query.