Current genetic detection methods require gene isolation, gene amplification and detection with a fluorescent-tagged probe. They typically require sophisticated equipment and expensive fluorescent probes, rendering them not widely available for rapid acute infection diagnoses at the point of care to ensure timely treatment of the diseases. Here we report a rapid genetic detection method that can detect the bacterial gene directly from patient stools using a piezoelectric plate sensor (PEPS) in conjunction with a continuous flow system with two temperature zones. With stools spiked with sodium dodecyl sulfate (SDS) in situ bacteria lysing and DNA denaturation occurred in the high-temperature zone whereas in situ specific detection of the denatured DNA by the PEPS occurred in the lower-temperature zone. The outcome was a rapid genetic detection method that directly detected bacterial genes from stool in < 40 min without the need of gene isolation, gene amplification, or expensive fluorescent tag but with polymerase chain reaction (PCR) sensitivity. In 40 blinded patient stools, it detected the toxin B gene of Clostridium difficile with 95% sensitivity and 95% specificity. The all-electrical, label-free nature of the detection further supports its potential as a low-cost genetic test that can be used at the point of care.