Re: How to validate the email field?

From: Date: Thu, 02 Nov 2000 13:37:33 +0000
Subject: Re: How to validate the email field?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-23388@lists.php.net to get a copy of this message
Hi, this regular expression works for me: $regex = "^[_\.0-9a-z-]+\@([0-9a-z-]+\.)+[a-z]{2,3}$"; then use: eregi($regex,$emailvalue); wieger > Hello all, > > 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. > > Thanks and regards > Chakravarthy K Sannedhi > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#23388) next »