I will be getting a hp compaq 8300 elite small factor pc in a couple of days and I can get a GTX 670 cheap and was wondering if they are compatible before I get the GTX 670, there is also a GTX 470 i could get as well.
It probably won't fit.
From my understanding, the 670 is the equivalent of the 1070 from several generations ago, which means there is no version with a low profile bracket. It is also too physically tall and long. This means it won't be able to physically fit in your 8300 sff, which requires low profile cards.
Not only that, but your Power supply won't support its power consumption, and won't even have 6 pin connectors for extra power.
I recommend getting the micro tower version of the pc (if it isn't too late) and getting a gtx 750 ti.
If you got the sff, get a gt 730 low profile.