PLEASE HELP PLEASE HELP PLEASE HELP

Kay
I'm getting BAD CRAMPS and I am NOT even on my period. It ended last week. I'm getting symptoms of my period starting but no period. Just sudden awful cramps and I had to rush to the bathroom. I've had an irregular cycle. Is it safe to take medicine?