It is definitely a Phlox and definitely
not Nicotiana. There are many indicators, but the most obvious is the shape of the stigmas. You can see some exposed pistils near the top of the photo. The stigma is split into 3 thin lobes. Nicotiana has a slightly bilobed stigma with more of a rounded, oval shape.