Question using CGI in Python

Maan Hamze mmhamze at pleiades.net
Tue Aug 28 18:55:41 EDT 2001


oppppsss Sorry
I mistook name for value.
In this case nothing should be wrong with:
Hidden = '<input type=hidden name=AnyNameHere value='+str(VAR1)+'>'
Then use
print Hidden
Maan
"Ignacio Vazquez-Abrams" <ignacio at openservices.net> wrote in message
news:mailman.999033582.32553.python-list at python.org...
> On Tue, 28 Aug 2001, Maan M. Hamze wrote:
>
> > or of course you can use:
> > print '<input type="hidden" name=',VAR1,'>'
> > As you see, you should not include your variable in the string because
it
> > will be treated just like another string.
>
> Ack! Using a comma in print will result in a space. But it's wrong
anyways.
> Use the following instead:
>
> ---
> print '<input type="hidden" name="VAR1" value="%s">' % VAR1
> ---
>
> --
> Ignacio Vazquez-Abrams  <ignacio at openservices.net>
>
>
>





More information about the Python-list mailing list