In my function to add the signature to the database it's suppose to send you to the "Thank You" page after the signature has been successfully added.
code from "add_signature"...
Code
$tid = pnModAPIFunc('bkbPetition',
'user',
'create_signature',
array('pid' => $id,
'uid' => $uid,
'realname' => $realname,
'email' => $email,
'address' => $address,
'city' => $city,
'state' => $state,
'zip' => $zip,
'sendhow' => $sendhow,
'extrafield' => $extrafield,
'catid' => $catid,
'comment' => $comment,
'showname' => $showname,
'country' => $country,
'sendcomment' => $sendcomment));
if ($tid != false) {
// echo ('id-' . $id . '<br>tid- ' . $tid . '<br>catid- ' . $catid);
pnRedirect(pnModUrl('bkbPetition',
'user',
'display_thankyou',
array('pid' => $id,
'sid' => $tid,
'catid' => $catid)));
return true;
}
'user',
'create_signature',
array('pid' => $id,
'uid' => $uid,
'realname' => $realname,
'email' => $email,
'address' => $address,
'city' => $city,
'state' => $state,
'zip' => $zip,
'sendhow' => $sendhow,
'extrafield' => $extrafield,
'catid' => $catid,
'comment' => $comment,
'showname' => $showname,
'country' => $country,
'sendcomment' => $sendcomment));
if ($tid != false) {
// echo ('id-' . $id . '<br>tid- ' . $tid . '<br>catid- ' . $catid);
pnRedirect(pnModUrl('bkbPetition',
'user',
'display_thankyou',
array('pid' => $id,
'sid' => $tid,
'catid' => $catid)));
return true;
}
code from "display_thankyou"
Code
list($pid,$sid,$catid) = pnVarCleanFromInput('pid','sid','catid');
extract($args);
$item = pnModAPIFunc('bkbPetition',
'user',
'get_petitions',
array('id' => $pid));
$pnRender =& new pnRender('bkbPetition');
$pnRender->caching=false;
$pnRender->assign('petition', $item);
$pnRender->assign('catid', $catid);
return $pnRender->fetch('user_display_thankyou.tpl');
extract($args);
$item = pnModAPIFunc('bkbPetition',
'user',
'get_petitions',
array('id' => $pid));
$pnRender =& new pnRender('bkbPetition');
$pnRender->caching=false;
$pnRender->assign('petition', $item);
$pnRender->assign('catid', $catid);
return $pnRender->fetch('user_display_thankyou.tpl');
The problem is that the variables $pid, $sid, and $catid in "display_thankyou" are not available to the fucntion, even though they are present when the function is called from the "add_signature" fucntion. The echo statement in "add_signature" just before "display_thankyou" confirms that the variables are set, just not being transferred to "display_thankyou".
Thanks for any help.
--
cyber_wolf
www.bkbsolutions.com - My Zikula module development site.
