Re: HTML_QuickForm - how to redirect to a different page? AND sql updating not processing
| From: | Justin Patrin | Date: | Sun, 14 Nov 2004 08:57:01 +0000 |
| Subject: | Re: HTML_QuickForm - how to redirect to a different page? AND sql updating not processing | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15487@lists.php.net to get a copy of this message | ||
On Sat, 13 Nov 2004 06:08:21 -0800 (PST), Stowe Spivey
<spiveyspivey@yahoo.com> wrote:
> I have tried everything I know how to do. Here's the code snippet.
> I have tried header{} and $form->jump('allAc.php') in both places
> (after validate and inside the funciton.
>
> The DB doesn't throw an error but it isn't processing properly
> either.
>
> I'm lost and haven't found much documentation on either redirecting
> or DB processing after validation.
>
> Any ideas are much appreciated.
>
> ===========================================================
> <form all set correctly and working>...
> if ($form->validate()) {
> $form->process('process_data', false);
> header("Location: allAc.php");//doesn't work here
How does it not work? Could it be this:
http://www.reversefold.com/tikiwiki/tiki-index.php?page=PHPFAQs#id644837
> exit;
> }
> function process_data ($values) {
> require('utilities/adm.php');
> $rUPDATE = $db->prepare('UPDATE cpl SET type=?');
> $db->execute($rUPDATE, array($values['radioType']));
> if (DB::isError($rUPDATE)) {
> die($rUPDATE->getMessage());
> }
> //header("Location: allActionsLoc.php");//doesn't work here either
> }
> ===========================================================
>
--
Justin Patrin