Sex on your period is just fine. But it sounds like she got a UTI. She should go to a doctor and get some antibiotics to clear it up. In the mean time, she should drink lots of water or sugar free cranberry juice. To help prevent this, tell her to pee after sex every time. This helps clear the bacteria from the urethra that can get pushed in there during sex.