It's very painful to pass hard stools... The child is trying to hold it in order to not feel pain... That's why he is standing. It will all be ok once he passes out the hard stools and you really have to watch his diet.
Next Steps
ask your Dr if you can apply local anaesthetic ointment in the anus region to relieve him of pain
Health Tips
high fibre diet including lots if fruits and vegetables.
lots of water in a day will avoid further problems