Hi, Not sure how you can address this immediately -there are anti-diarrheao medications you can try to stop this, but the issue is the long term. For now ensure he drinks lots of clear fluid to prevent dehydration. He needs electrolytes in an ideal world.
I think you need to look at why he is so constipated, and if he is holding on, why. Did you know that an over-full bowel can create/exacerbate enuresis and these two may be linked to some extent.
Are you seeing a consultant about this, both the constipation and the enuresis? If not (and I do apologise if I am teaching my granny to suck eggs) you should get medical help, more than a GP appointment, for help with both. If the withholding is emotional you may need CAHMS input.
He is 12. You cannot allow this to continue longer without proper medical advice (and once again apologies if you are already addressing this).
The problem with long term use of laxatives is that they desensitise the bowel and stop it working in a proper way. After this episode he will become constipated again. It's an awful cycle. If you have not done so, please read up on constipation and the way laxatives work. Look at his diet. Think about gut flora and how it may be upset, and the possibility of candida.
Re for today, fluid and electrolytes. Food when he can face it. Keep him near a loo (obviously). How you make reparation for this silly over use of laxatives is up to you. I don't mean to nag or sound censorious but you really must not EVER overdose with laxatives especially on a child.
I hope someone with proper medical knowledge comes to offer advice soon. But beware dehydration.
Your poor boy.