A urinary tract infection (UTI) (also known as acute cystitis or bladder infection) is an infection that affects part of the urinary tract. When it affects the lower urinary tract it is known as a simple cystitis (a bladder infection) and when it affects the upper urinary tract it is known as pyelonephritis (a kidney infection). Symptoms from a lower urinary tract include painful urination and either frequent urination or urge to urinate (or both); while the symptoms of pyelonephritis include fever and flank pain in addition to the symptoms of a lower UTI. In some cases, a painful burning sensation in the urethra may be present even when not urinating. In the elderly and the very young, symptoms may be vague or non-specific. The main causal agent of both types is Escherichia coli, though other bacteria, viruses or fungi may rarely be the cause. Urinary tract infections occur more commonly in women than men, with half of women having at least one infection at some point in their lives. Recurrences are common. Risk factors include female anatomy, sexual intercourse and family history. Pyelonephritis, if it occurs, usually follows a bladder infection but may also result from a blood-borne infection. Diagnosis in young healthy women can be based on symptoms alone. In those with vague symptoms, diagnosis can be difficult because bacteria may be present without there being an infection. In complicated cases or if treatment has failed, a urine culture may be useful. In those with frequent infections, low dose antibiotics may be taken as a preventative measure. In uncomplicated cases, urinary tract infections are easily treated with a short course of antibiotics, although resistance to many of the antibiotics used to treat this condition is increasing. In complicated cases, a longer course or intravenous antibiotics may be needed, and if symptoms have not improved in two or three days, further diagnostic testing is needed. In women, urinary tract infections are the most common form of bacterial infection with 10% developing urinary tract infections yearly. In those who have bacteria or white blood cells in their urine but have no symptoms, antibiotics are generally not needed, although pregnant woman are an exception to this recommendation.