RE: [PHPLIB] form validation From: Michael Anthon (mca <email protected>)
Date: 03/21/00

> $f->add_element(array("type"=>"submit","name"=>"dodaj"));
>
> if ($dodaj) {
> if ( $f->validate(array("nazwa"))) echo "ok";
> else echo "not";
> }

The problem is the test you are doing in the first 'if' statement. You have
not set a value for the dodaj element, therefore 'if ($dodaj) ...' will
always return false, so the validation is never performed

Either set a value for the dodag element or change the test to 'if
(isset($dodaj))'

Cheers
Michael Anthon
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.