Help?

hello, I have a question... I've been feeling pain in my bladder, kind of like cramps... I'm not close to my period but I did have sex a couple days ago... does this mean I have a UTI? & can this be caused by sex?