All of these medicines work by relaxing smooth muscles and increasing blood flow in the penis during sexual stimulation. You should not take any of these medicines to treat ED if you are taking nitrates to treat a heart condition. Nitrates widen and relax your blood vessels. The combination can lead to a sudden drop in blood pressure, which may cause you to become faint or dizzy, or fall, leading to possible injuries.
You should talk to your doctor about possible treatments. You may want to talk to other patients who have had the treatment planned for you. You also may want to seek a second doctor's opinion about surgery before making your decision. You may find it difficult to talk to your doctor about impotence. You will want to find a doctor who treats this condition and will help you feel comfortable talking about the problem and choosing the best treatment. You can also get more information by contacting your local National Kidney Foundation affiliate.
The primary nerve fibers to the penis are from the dorsal nerve of the penis, a branch of the pudendal nerve. The cavernosal nerves are a part of the autonomic nervous system and incorporate both sympathetic and parasympathetic fibers. They travel posterolaterally along the prostate and enter the corpora cavernosa and corpus spongiosum to regulate blood flow during erection and detumescence. The dorsal somatic nerves are also branches of the pudendal nerves. They are primarily responsible for penile sensation. 
Although not proven, it is likely that erectile dysfunction can be prevented by good general health, paying particular attention to body weight, exercise, and cigarette smoking. For example, heart disease and diabetes are problems that can cause erectile dysfunction, and both are preventable through lifestyle changes such as sensible eating and regular exercise. Furthermore, early diagnosis and treatment of associated conditions like diabetes, hypertension and high cholesterol may prevent or delay erectile dysfunction, or stop the erectile dysfunction from getting more serious.
For best results, men with ED take these pills about an hour or two before having sex. The drugs require normal nerve function to the penis. PDE5 inhibitors improve on normal erectile responses helping blood flow into the penis. Use these drugs as directed. About 7 out of 10 men do well and have better erections. Response rates are lower for Diabetics and cancer patients.