A prescription delivered by a doctor in your country is valid in all EU countries. However, medicine prescribed in one country might not be available in another, or it may bear another name.
For those taking regular medication should ask your doctor if he can prescribe enough to cover your trip or ask for a EU cross border prescription from your GP in the UK. Criteria for these can be found on the NHS choices website on the link below. For those who are already abroad without prescriptions. Visit a local health centre with ID and EHIC to request a prescription from the GP.
Cross Border Prescriptions
As of 25 October 2013 you are able to ask for a cross-border prescription which is intended for use in another EU country: these are designed to help the pharmacist understand the prescription easily, the ingredients of the medicine and their dosage.
Take not that the terms will be the same as a national of the country you are visiting so please check if there are any payments to be made.
For information on the co payment system in Spain.
Co Payment
Prescription Charges and Reimbursements