The British National Health Service writes:
Avoid buying erectile dysfunction drugs on the internet. It's possible to buy ED medication on the internet, but this is not recommended. These medications are not regulated, and the amount of active ingredients in them can vary, with some leading to unpleasant side effects. 
The American Mayo Clinic writes:
It is important that you tell all of your doctors that you take sildenafil [Viagra]. If you need emergency medical care for a heart problem, it is important that your doctor knows when you last took sildenafil.