RE: [PHP] email validation string.
| From: | WeberSites LTD | Date: | Fri, 19 Jan 2007 10:15:15 +0000 |
| Subject: | RE: [PHP] email validation string. | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-247389@lists.php.net to get a copy of this message | ||
You can always go to http://www.weberdev.com/ and write
"email validation"
in the Top Ajax search box. There are many other email validators that
should have less than 600 lines in one function :)
berber
-----Original Message-----
From: Roman Neuhauser [mailto:neuhauser@sigpipe.cz]
Sent: Friday, January 19, 2007 12:17 PM
To: WeberSites LTD
Cc: 'Don'; php-general@lists.php.net
Subject: Re: [PHP] email validation string.
# berber@weber-sites.com / 2007-01-19 10:55:21 +0200:
> From: Don [mailto:don.rzeszut@gmail.com]
> > I'm trying to get this line to validate an email address from a form
> > and it isn't working.
> >
> > if (ereg("^.+@.+\..+$",$submittedEmail))
> >
> > The book I'm referencing has this line
> >
> > if (ereg("^.+@.+\\..+$",$submittedEmail))
1. Why did you remove the backslash? (the original was correct) 2. What do
you expect the regexp to match?
3. Define "it isn't working".
> Try this : http://www.weberdev.com/get_example-3274.html
This will reject addresses that use greylisting, and 600 lines in a single
function is gross. I wouldn't touch that.
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php