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 email@example.com
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 firstname.lastname@example.org instead of email@example.com.
(I don't need for it to check the 'whatever' part, just the '@anydomain.tld' part.)