Re: Validating form input data



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

.



Relevant Pages

  • Re: Tier3 today - And Flex-it like NASDAQ (*Only better!*)
    ... FlexBuilder, or just working on the FABridge functionality in general, you ... ArrayCollections are completely accessible via the Javascript in ... Broadcasted server to client messages, ...
    (comp.os.vms)
  • Re: newbie question
    ... They also render JavaScript, but that is generally for the purpose ... of handling client-side events on the server. ... Controls as well. ... >> compiling without Visual Studio, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Proposal for Lite Encryption for Login Form without SSL
    ... the form uses javascript to hash the password ... This way the password is not sent to the server ... This would be the equivalent to a public key in public key encryption ...
    (comp.lang.php)
  • Re: Which Is The Better Approach To Working With Javascript?
    ... Server side processing: Web server gets form input, ... the Javascript module, and PHP collects the output for document ... form input processed on the client side and rendered (probably ...
    (comp.lang.php)
  • Re: Visual Studio only debugs javascript in .js files not .aspx fi
    ... An ASPX page is a class that generates HTML ... from the server. ... including any literal JavaScript in the page code, ... is used by the client browser to execute JavaScript on the client side, ...
    (microsoft.public.dotnet.framework.aspnet)