Re: QuickForm process() calling class function
| From: | Brad Hubbard | Date: | Wed, 14 Sep 2005 03:19:02 +0000 |
| Subject: | Re: QuickForm process() calling class function | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-20957@lists.php.net to get a copy of this message | ||
On Wed, 2005-09-14 at 05:33, Charles Kline wrote:
> I am trying to use my data processing class to handle the INSERT from
> my QuickForm. But this is not working. Any thoughts? Is there a
> proper way to do this, since this method does not seem to be working?
>
> if ($form->validate()) {
> $form->freeze();
> $form->process('process_data', false);
> exit;
> } else {
> $form->display();
> }
>
> function process_data ($values) {
> $dbq->setPR($values);
> }
This should work. Does your $dbq object need to be declared global in the process_data function?
I believe HTMLQuickForm::process() should throw an error (PEAR::Error()?), perhaps you could look
at the error message generated.
HTH,
Brad
--
This message was scanned for spam and viruses by BitDefender.
For more information please visit http://linux.bitdefender.com/