PHP Validate Email Address

When a user submits their email address in a form, you want to be sure it is a real email address. We will use the function preg_match() to see if it matches our regex for emails.

[code lang=”php”]

[/code]

You can submit the email to this function using something like this:

[code lang=”php”]

[/code]

It is that simple! 🙂 Enjoy.

Filed under: Web ProgrammingTagged with: , ,

1 Comment


Add a Comment

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

Comment *
Name *
Email *
Website