Code Snippets

Check Valid Email Address – PHP Code Snippet

Riz Ali
Riz
Mar 4, 2014
1 min read
55 words
Check Valid Email Address - PHP Code Snippet

Starting a new series about code Snippets, In this series we share some useful code snippets of HTML, HTML5, CSS, CSS3, PHP, Javascript and jQuery snippets. We hope that these snippets will worthwhile for our readers and should help in your projects.

Today we share a PHP Code Snippets “Check valid email address”.

[php]
This is a valid email.

‘;
}else{
echo ‘

This is an invalid email.Make Cross Browser Transparency With CSS

‘;
}
}
?>

Email:

[/php]

Source

CSS Media Queries For All Common Devices
Riz Ali

Riz

Author

Riz is a Senior Web Strategist with over 14+ years of hands-on experience in full-stack web design and digital architecture. Having successfully delivered 250+ web projects, he believes passion is the engine of innovation. Riz specializes in translating complex technical concepts into accessible, fanatical content, helping businesses bridge the gap between aesthetic design and high-performance engineering. His work has been instrumental in scaling digital presence for startups and established brands alike.

View all posts

Continue reading

You might also like

6 responses to “Check Valid Email Address – PHP Code Snippet”

    1. All you are doing there is checking if the domain used in the email address exists and accepts email. It doesn’t prove that the email address in question actually exists. May as well just use filter_var or regex and save on the resources.

    1. Yes filter_var does not allow some addresses that are perfectly valid according to the RFC specs. foo@bar is actually a valid email address.

    2. I had the problem this week : with the mail “tester@customer-ä.de” … so I will use a regex next time.

  1. Might as well of just posted a link to the PHP page about using filter_var. You don’t even list the available options nor do you mention any of the issues that come with using filter_var.

Leave a Reply

Your email address will not be published. Required fields are marked *

Menu