in reply to form help

Hmm, I know it's not Perl, but in my opinion form validation on the web is faster and easier to do in simple cases like this using Javascript.

Then you don't have to process the form on the server just to see if the user filled in one field OR another. The web browser does this and can display a warning message on the screen as well without any traffic to the server being generated.

Simple functionality like this should be fairly browser-independent. If you are targetting browsers that don't support Javascript, though, use Perl;

Replies are listed 'Best First'.
javascript _and_ perl
by Agermain (Scribe) on Aug 13, 2001 at 17:33 UTC
    JavaScript would be good to keep the user from hitting Submit with a bad email address or phone number, but you really should be checking to make sure that it's valid data if they have JavaScript off, or are intentionally bypassing your form to try and break your server, right? Besides, it's fun coming up with messages to tell the script kiddies you're onto their game. :) IMHO, using both, with JavaScript as a first line of idiotproofing, doesn't really hurt.

    andre germain
    "Wherever you go, there you are."

      I agree !

      Simple form validation on the front to help users to enter the correct data (and make sure required fields are filled in). Perl logic at the back to make sure the whole lot is solid and won't break anything.