Peed myself

I just got diagnosed with a uti. I was coming home and pee came out and I did not know how to control it!! I was so embarrassed I mean no one saw but still! Has this happened to anyone ??