A method of detecting the presence or amount of a first target nucleic acid in a sample, the method comprising: (a) linking first and second universal DNA segments into a first molecule in a linking reaction dependent on the first target nucleic acid, thereby providing a first tagged target nucleic acid; and (b) PCR amplifying the first tagged target nucleic acid using first and second universal primers, each universal primer having a 3' portion that anneals to one of the two universal DNA segments, wherein: the 3' portion of the first universal primer anneals to the first universal segment; a 5' portion of the first universal primer comprises a sequence that is capable of annealing to a complement of the first universal DNA segment, the second universal DNA segment, or the first target nucleic acid an amplicon generated upon extension of the first universal primer forms an intramolecular hairpin stem between the 5' portion of the first universal primer and a portion of the amplicon complementary to the first universal DNA segment, the second universal DNA segment, or the first target nucleic acid; or wherein the first universal primer forms a circular structure upon annealing to the first tagged nucleic acid that brings the 3' and 5 '-ends of the first universal primer close to each other; and, formation of the hairpin stem or circular structure results or causes a change in a first detectable signal, the first detectable signal indicating the presence or quantity of the first target nucleic acid in the sample. (a) linking first and second universal DNA segments into a first molecule in a linking reaction dependent on the first target nucleic acid, thereby providing a first tagged target nucleic acid; and (b) PCR amplifying the first tagged target nucleic acid using first and second universal primers, each universal primer having a 3' portion that anneals to one of the two universal DNA segments, wherein: the 3' portion of the first universal primer anneals to the first universal segment; a 5' portion of the first universal primer comprises a sequence that is capable of annealing to a complement of the first universal DNA segment, the second universal DNA segment, or the first target nucleic acid an amplicon generated upon extension of the first universal primer forms an intramolecular hairpin stem between the 5' portion of the first universal primer and a portion of the amplicon complementary to the first universal DNA segment, the second universal DNA segment, or the first target nucleic acid; or wherein the first universal primer forms a circular structure upon annealing to the first tagged nucleic acid that brings the 3' and 5 '-ends of the first universal primer close to each other; and, formation of the hairpin stem or circular structure results or causes a change in a first detectable signal, the first detectable signal indicating the presence or quantity of the first target nucleic acid in the sample. the 3' portion of the first universal primer anneals to the first universal segment; a 5' portion of the first universal primer comprises a sequence that is capable of annealing to a complement of the first universal DNA segment, the second universal DNA segment, or the first target nucleic acid an amplicon generated upon extension of the first universal primer forms an intramolecular hairpin stem between the 5' portion of the first universal primer and a portion of the amplicon complementary to the first universal DNA segment, the second universal DNA segment, or the first target nucleic acid; or wherein the first universal primer forms a circular structure upon annealing to the first tagged nucleic acid that brings the 3' and 5 '-ends of the first universal primer close to each other; and, formation of the hairpin stem or circular structure results or causes a change in a first detectable signal, the first detectable signal indicating the presence or quantity of the first target nucleic acid in the sample.