i am creating a register page for my website and i wish to create some kind of validation upon the email box so that only people with a valid domain can become a member and then use my website.
So only people with domains such as @bathspa.ac.uk etc... can join the site.
So i have created my database table to contain the domain names of all the universities within the UK and the table is called 'domain' and the feilds are called 'domain_id' to uniqely identify each domain with the table and 'domain_name' which contains the domain extension such as @bathspa.co.uk.
now i have looked at scripts on the internet and i dont want to use javascript due to personal development reasons, so i am looking to use a PHP script.
I was unsure how to start but i have found some code below which i understands checks if a email is correct but i wish to check the second part of the string after the '@' against the list in my database table.
if anyone could help ASAP i would be most grateful
Kind Regards
noobCoder