Thank you for your query at DoctorSpring.com
It seems like your boyfriend has picked up an urinary infection, the chances of which increase post anal sex.
I will recommend that he takes Tab. Norflox 400 mg twice daily for 5 days, and if there is excessive burning, Cranberry juice ( 2-3 glasses ) per day will make the urine less acidic, and hence the burning or pain sensation while passing urine will reduce.
Hope this was helpful,