Thread CGI.pm und Ampersand/escape (15 answers)
Opened by bianca at 2010-07-29 11:33

pq
 2010-07-29 14:03
#140141 #140141
User since
2003-08-04
12209 Artikel
Admin1
[Homepage]
user image
Quote
hidden() produces a text field that can’t be seen by the user. It is
useful for passing state variable information from one invocation of
the script to the next.

Parameters:
1. The first argument is required and specifies the name of this field
(-name).

2. The second argument is also required and specifies its value
(-default). In the named parameter style of calling, you can
provide a single value here or a reference to a whole list

Fetch the value of a hidden field this way:

$hidden_value = param('hidden_name');

Note, that just like all the other form elements, the value of a hidden
field is "sticky"
. If you want to replace a hidden field with some
other values after the script has been called once you’ll have to do it
manually:

param('hidden_name','new','values','here');


wie gesagt, ich ziehe sowieso templates vor, und das istein weiterer grund.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread CGI.pm und Ampersand/escape