birth control pill

Te
So I'm on my period and me and my partner had sex but the condom broke and immediately as soon as it happen, he got it out and I went to the bathroom to clean myself. Because they say that a birth control works right away during your period, does that mean if I start drinking a birth control pills today, would it get rid of the chances of getting pregnant?