I am looking for the Correct IF Statement to validate the domain.tld part of an email.
Here is what I have:
// check if email is a valid address in this format firstname.lastname@example.org
if(!ereg("[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]", $email_input)) $error_msg.="Please enter a valid email address<br>";
Problem is, I need to check the domain.tld part of it so that it checks for a SPECIFIC domain.tld such as email@example.com instead of firstname.lastname@example.org.
(I don't need for it to check the 'whatever' part, just the '@anydomain.tld' part.)