Period cramps on and off

They keep coming and going but everytime they come I go to the toilet and have loose bowls so I don’t think it’s contractions?? As it wouldn’t make me go to the toilet everytime right?? Back and lower belly cramp like period pains 39 w+1