anfrayphi
I use the thanks parameter for transfering a backlink (Then I can use the same action script for different queries).
In the action script I build a formatted answer of the database query and return that together with the backlink code. The link code must be handled with p_render() and p_get_instructions():
Wiki query page:
<form>
Action script query.php
...
Thanks "[[querypage]]"
</form>
Code in action script:
$link = p_render('xhtml',p_get_instructions($thanks),$info);
return $link.$queryresult;
Uwe