[Zope] Newbie CGI question
Patrick Lewis
pl@user2.teleport.com
Wed, 21 Jun 2000 13:04:19 -0700
Not sure this is what you are looking for, but here it goes:
On Wed, Jun 21, 2000 at 09:38:30AM -0700, jholland@gears.linuxave.net wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> How can I access the variables passed into a DTML called as a Form by
> another DTML? it has the usual ?x=1&y=2 ... stuff - I'd really like to loo
> through these.
I assume you have two fields in your form, like this:
<form action="foo_dtml" method="POST">
<input type="text" name="x">
<input type="text" name="y">
...
</form>
Then, in foo_dtml, you would display them as:
<dtml-var x> <dtml-var y>
Easy so far.
>
> Also can I construct a string and then evaluate it? ie
>
> varname="therealvar" + "name"
>
> <some sort of eval> varname
>
> that would return the contents of the variable "therealvarname".
I think this is what you are looking for:
<dtml-let varname=" 'therealvar' + 'name' ">
<!-- varname should now be equal to 'therealvarname' -->
<dtml-var varname>
</dtml-let>
--
Patrick Lewis <pl@teleport.com>