Hello,
andI have a newbie question related to validating required Form fields.
Suppose we have a two-step user registration process with scripts register1.php and register2.php, each page containing a set of required
non-required fields. In register1.php, when user submits the form, itcalls
register2.php as the action. In register2.php, I want to validate theForm
withvalues submitted by the user in register1.php and if any of the required fields is missing a value, I want to re-dispaly the register1.php page
failsthe appropriate error message.
What is the most appropriate way to handle this? Once the validation
in register2.php, can I call register1.php with parameters? If so, how?Or
do I use session variables to capture the error information? How do I redirect to register1.php from within the code execution of register2.php?
You may want to try this forms generation and validation class using hidden fields to pass validated data to next page.
http://www.phpclasses.org/formsgeneration
You may also use in conjunction this multi-page forms class that seems to do more like what you need:
http://www.phpclasses.org/multipageforms
--
Regards, Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php