Re: Form Validation
| From: | Jeff Warrington | Date: | Tue, 08 Aug 2000 19:02:18 +0000 |
| Subject: | Re: Form Validation | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10744@lists.php.net to get a copy of this message | ||
In article <3.0.5.32.20000808174010.0079d100@pop.phreaker.net>,
cyco_sid@phreaker.net (Sid) wrote:
check if field has only letters:
if (eregi("[^[:alpha:]]",$form)) {
throw_error();
}
numbers:
if (eregi("[^[:digit:]]",$form)) {
throw_error();
}
Jeff
> I need to validate a form in PHP. Here are the things I have a prob
> with. Checking if a field has only letters. Checking if a field has only
> numbers Checking if a field contails a valid e-mail address like
> someone@somthing.com Checking if a field does not have any special
> charecters like ~!@#%$^*()
>
> I also want to thank everyone who answered my question of how to convert
> lower case to upper case.
>
> SID
>
>