Sildenafil does not prevent pregnancy or the spread of sexually transmitted diseases such as human immunodeficiency virus HIV. Its effects might last longer if you have mild to moderate ED. This medicine works best when you take it on an empty stomach an hour before sex. They’re often the first line of treatment for trouble getting or keeping an erection, called erectile dysfunction ED. If you become pregnant while taking sildenafil, call your doctor. Before taking sildenafil, tell your doctor and pharmacist if you are allergic to sildenafil, any other medications, or any of the ingredients in sildenafil tablet or suspension. Sildenafil Viagra is used to treat erectile dysfunction impotence; inability to get or keep an erection in men.If you have these symptoms, stop taking VIAGRA and contact a doctor right away. Before you take VIAGRA, tell your healthcare provider if you: • have or have had heart problems . Oral medicines for ED usually work well and cause few side effects. The four main medicines taken by mouth for erectile dysfunction are: Avanafil (Stendra). Sildenafil . Learn about uses, how it works, and more for Viagra (sildenafil). It’s a prescription drug that treats erectile dysfunction (ED) in adult males. Health Conditions.