Re: HTML_QuickForm - how to redirect to a different page? AND sql updating not processing
| From: | Ignatius Reilly | Date: | Sat, 13 Nov 2004 15:51:37 +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-15482@lists.php.net to get a copy of this message | ||
your location must be a URL:
header( "Location: http://domain/allAc.php" )
;
_________________________
"Stowe Spivey" <spiveyspivey@yahoo.com> wrote in message
news:20041113140821.58038.qmail@web51102.mail.yahoo.com...
> 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
> 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
> }
> ===========================================================
>
>
>
> __________________________________
> Do you Yahoo!?
> Check out the new Yahoo! Front Page.
> www.yahoo.com
>