Re: VERY IMPORTANT question about validation using php

In article <olact3p0uph0h7hhv5ohao0m7k2t0rsv3k [at] 4ax.com>, timr [at] probo.com
says...
> Sudhakar <sudhakararaog [at] gmail.com> wrote:
> >
> >i am using php in order to validate a form where users register.
> >please help me to solve the following validations.
> >
> >1. name can have spaces. ex= john smith
> >presently the validation i am using is if( $fname == "" || !
> >eregi("^[a-zA-Z_]+$", $fname) )
> >i need the syntax which would accept a-zA-Z WITH A SPACE IN BETWEEN
> >NAMES ex= john smith
>
> Could you really not figure out how to add "space" to the list of legal
> characters in that?

Its easy to forget many people building web sites are not trained
programmers.... anyway...

sigh... For all those that cant do/dont like/dont want/ ... regex's
or complex PHP

www.streamforensics.com - automated forms validation - look for the
pforms program - what you want is a simple look up in their function list
described in simple english. There is even a free trial version you can
use live safely.

It even writes all the PHP validation code for you.
good [ Fr, 04 April 2008 19:04 ] [ ID #1935693 ]

Re: VERY IMPORTANT question about validation using php

good [at] respnse.sic.com wrote:
> In article <olact3p0uph0h7hhv5ohao0m7k2t0rsv3k [at] 4ax.com>, timr [at] probo.com
> says...
>> Sudhakar <sudhakararaog [at] gmail.com> wrote:
>>> i am using php in order to validate a form where users register.
>>> please help me to solve the following validations.
>>>
>>> 1. name can have spaces. ex= john smith
>>> presently the validation i am using is if( $fname == "" || !
>>> eregi("^[a-zA-Z_]+$", $fname) )
>>> i need the syntax which would accept a-zA-Z WITH A SPACE IN BETWEEN
>>> NAMES ex= john smith

$no_leading_or_trailing_spaces = trim($fname);
sheldonlg [ Sa, 05 April 2008 16:13 ] [ ID #1936240 ]
PHP » comp.lang.php » Re: VERY IMPORTANT question about validation using php

Vorheriges Thema: php + mysql + localhost editor?
Nächstes Thema: PHP Notice: Undefined property: