[pmwiki-users] Again: Parameterizing Content
Marc Cooper
gmane at auxbuss.com
Sun Jul 2 07:46:21 CDT 2006
Felix E. Klee said...
> At Wed, 17 May 2006 22:47:12 +0200,
> Felix E. Klee wrote:
> > [Is it possible to build interactive form based sites with pmwiki?]
>
> Some days ago, I finally tried out an approach that worked out like a
> charm. All that's needed in addition to pmwiki's built in forms
> facility is Martin Fick's HttpVariables cookbook recipe:
>
> http://www.pmwiki.org/wiki/Cookbook/HttpVariables
>
> Here's how it works:
>
> * The form contains an action URL that points to some CGI program.
>
> * The CGI will process the input data and redirect to a wiki page,
> passing the output using Get syntax.
>
> * The wiki page for showing the results makes use of the HttpVariables
> recipe to read out the values to display.
>
> An example:
>
> http://www.tagtrade.org/Portal/URNXTradeA-0-1-crea-GenerTag-task
Another way to do this is to create session variables in your script.
For example,
session_start();
$_SESSION['testname']= $_POST['testone'];
$FmtPV['$TestName'] = $_SESSION['testname'];
You can then refer to the variable via markup in the usual way (i.e.
{$TestName}). The advantage here being that you can reuse the data
across the wiki, e.g. for a shopping basket.
--
Best,
Marc
More information about the pmwiki-users
mailing list