Re: QuickForm process() calling class function

From: Date: Wed, 14 Sep 2005 21:47:55 +0000
Subject: Re: QuickForm process() calling class function
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-20968@lists.php.net to get a copy of this message
On 9/13/05, Charles Kline <ckline@rightcode.net> 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); In this case, using your own function to just pass on the call isn't needed. Try: $form->process(array(&$dbq, 'setPR'), false); > exit; > } else { > $form->display(); > } > > function process_data ($values) { If you did decide to use this function the problem is likely that you aren't declaring $dbq. > $dbq->setPR($values); > } > -- Justin Patrin

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