My nephews is 7 years old and keeps having accidents, number 2. Not that much poo tho more like skid marks but more then that. He hardly eats, is very thin, and gets stomach cramps. I would assume constipation but what is causing his constipation he eats

Skid marks & cramps. Are good. Means the colon is trying to work. He's full of dry, stony stool that is painful to pass. Give mineral oil to lubricate passage 30 ml 2-3x/day until oil & stools pass. Avoid laxatives like miralax (polyethylene glycol). If no improvement after 2 weeks see md. Once stools are moving well cut back on mineral oil & add fiber & prune juice to diet. Establish good bowel habits - a daily, relaxed time to sit & wait.