To find out if you have gonorrhea or chlamydia, your health care provider may take a sample of cells from your throat, cervix, urethra, or rectum where the infection may occur. Gonorrhea and chlamydia also can be detected with a urine test.