Re: How to validate the email field?
| From: | Manuel Lemos | Date: | Fri, 03 Nov 2000 18:30:35 +0000 |
| Subject: | Re: How to validate the email field? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-23610@lists.php.net to get a copy of this message | ||
Hello,
On 01-Nov-00 17:15:37, you wrote:
>We are doing a survey on the network performance at UAB. In the survey form
>provided to the users we are having an email field, which was declared as
>varchar(25). Because of that even some body fills like 'ah:#@fhjk-@///kjdfr'
>as their email address, our form is accepting it as a valid email field. So
>we want to apply some validation while the user submits that form. Can any
>one suggest us how we can apply this.
I do exactly that in subscription of the PHP Classes site. First the
e-mail address is validated against a regular expression with this
forms generation and validation class both on the client side and then on
the server side:
http://phpclasses.UpperDesign.com/browse.html/package/1
Then on the server side I use this class to check with the destination SMTP
server if the specified mail box really exists.
http://phpclasses.UpperDesign.com/browse.html/package/13
Regards,
Manuel Lemos
Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--