PHP Questions Home
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

How do I check that a valid email address is entered?


To do this you will need to use a regular expression.

The best these can do is check that it appears to be in a valid format, of course there is no way to check if sending an email to that address will get delivered - short of actually sending a message and checking that there is no bounce!

These tend to look horrendously complicated and so rather than work one out, find one you like off an internet site and go with that.

There are many candidates out there, here is one possibility:

^[^@]{1,64}@[^@]{1,255}$

Comments on this Question/Answer

How do I check that a valid email address is entered?
By: gosho michael, 04 Jun 2009 07:48:11



Reply to comments / post your own comment >>>

ASK A QUESTION

More forms PHP Questions

How do you check for an empty field in a form?

I am having a form. Here, i am submitting the form using java script as its necessary. If the form method is get, i am able to get in redirection page and can get the hidden values in the form. But if the form method is post, i am not able to get those hi

Hello, I an trying to figure out how to pass a variable email address to the contact form where you see the send-to-me@me.com. My contact page In a php file uses the following iframe embed: The contact script in feedback/contact. php

Hi all , I use CURL to login to webtrafficagents.com . I got the script and modified it to login to several sites , but it can't login to this one , any experts can help , a reward is granted :) what i want : I want to be able to view the source

I am using mail()to process a form. I can only get part of the form to be sent. The $message part only picks up one field in the form.



Custom Search