script should compare allowed domains listed in the database
to the email domain being used to join.
IF the domain is in the allowed domains list it should proceed.
If the domain is not in the allowed list ot gives an error message.
It works fine when you only have 1 domain listed in the database
but if you add more than one domain the array always list/compares
the first one.
if I have [url removed, login to view] and [url removed, login to view] listed as allowed domains then anyone using a gmail or google email address should be allowed to join. the way it works now is gmail can join but google gets the message the domain is not allowed.