[pmwiki-users] getting form variables

Tom Carchrae carchrae at 4c.ucc.ie
Thu Mar 23 11:24:44 CST 2006



> On Thu, Mar 23, 2006 at 01:28:59PM -0000, Tom Carchrae wrote:
>> eg, on one page:
>>
>> (:input form "pmwiki.php?n=Page2":)
>> (:input text name size=30:)
>> (:input end:)
>>
>> and then on Page2
>>
>> hello (:getarg name:)!
>I've been thinking of adding a {?name} markup, which would return
> the value from a submitted form or url.  Maybe I'll write up
> a recipe for it and people can try it out.

that would be great.

it would allow all sorts of things, like creating confirmation pages
before submitting a form.  i would like to use it to create paypal
buttons based on what existed in the previous form page.

incidentally, is there a way to include a php script inside a wiki
page?  for example, say i have a form processing page which did something
with the data, like write it to a file or email it.  is it possible
to call that script from the a wiki page, giving it access to the
form variables.

at the moment, i use pmwiki to make the form, have a form processing
page which does its business (eg, save/email) and then redirects to
another wiki page.

it would be great to be able to run that script from inside a wiki
page, eg, (:php_include script.php:)

thanks,

tom





More information about the pmwiki-users mailing list