Re: Validating form input data
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Validating form input data

From: John Dunlop <usenet+2004@john.dunlop.name>
Date: Sun Apr 30 2006 - 19:02:26 CEST

Jerry Stuckle:

> Manuel Lemos wrote:
>
> > You may want to take a look at this forms generation and validation
> > class that shows you how to do that. Additionally it generates your
> > forms with Javascript to validate the form also on the client site,
> > avoiding unnecessary server round trips just to tell the user the form
> > has invalid fields.
> >
> > http://www.phpclasses.org/formsgeneration
>
> And what happens if someone has javascript turned off?

  I would assume the brunt of Manuel's class is its server-side
checking. The javascript is, as he said, an *addition*, an addition
which, when javascript happens to be available, obviates the need for a
round trip to the server just to say some field data was unacceptable.
Sounds good to me.

> NEVER rely on client side validation!

  Fair enough, bears repeating.

-- 
Jock
Received on Mon May 1 03:07:58 2006