Python and HTML hidden input variables
Mikael Olofsson
mikael at isy.liu.se
Fri Oct 22 09:58:03 EDT 1999
On 22-Oct-99 rainer2207 at my-deja.com wrote:
> test = "Hello"
> print "<input type=\"HIDDEN\" name=\"username\" value=test>"
>
> but this returns the string test rather than "Hello". Is there anyway
> I can get it to pass "Hello"? Am I right in leaving out the double
> quotes for the value part? Any help would be appreciated. Thanks.
test is a variable in your python code, not in the generated html code.
Is there anything wrong with
print "<input type=\"HIDDEN\" name=\"username\" value=" + test + ">"
or have I completely misunderstood your question?
/Mikael
-----------------------------------------------------------------------
E-Mail: Mikael Olofsson <mikael at isy.liu.se>
WWW: http://www.dtr.isy.liu.se/dtr/staff/mikael
Phone: +46 - (0)13 - 28 1343
Telefax: +46 - (0)13 - 28 1339
Date: 22-Oct-99
Time: 15:55:08
This message was sent by XF-Mail.
-----------------------------------------------------------------------
More information about the Python-list
mailing list