Re: QuickForm basics

From: Date: Wed, 01 Oct 2003 18:01:07 +0000
Subject: Re: QuickForm basics
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8199@lists.php.net to get a copy of this message
Hi! Keith Pettit wrote:
To be honest I looked at the HTML_QuickForm_Controller examples and said to myself "huh".
Heh, thanks. :]
I'm fairy new to PHP and I understand functions pretty well but to write a class to use another class, to display a 3 page form sesms pretty over the top and more complicated than my brain can understand right now.
In fact it does a bit more than just display a 3 page form, but if you are just starting PHP then it can look convoluted indeed...
There may be less lines of code but if it takes more time to write that code becuase of the complexity I loose ground.
OK, now I seem to understand your problem. Don't throw the form values around. It's much easier to define the form in one script and process it (e.g. save values to database) in that script too. Only then redirect to a next page. But don't pass any form values, just pass the 'status' variable and display the 'thank you' message or whatever you want. If you need to populate the form on the second page, just pass an id for the database record created in the first page and query the database to get the values.

« previous php.pear.general (#8199) next »