If you want to try taking Viagra to treat a condition known as erectile dysfunction or male impotence, you should talk to your doctor about obtaining a prescription for Viagra. Any health care professional should be able to prescribe the drug, but some online pharmacies will sell it without a prescription.