> if ( $viewtag = "1" ) {
> print "The value of \$view was $view\n";
> }
There are a few problems with that. First, you generally want a double equals '=='
with a numeric
comparison. You are assigning the value of "1" to $viewtag with returns "1" as the
result which
automatically evaluates
> "You" == <[EMAIL PROTECTED]> writes:
You> if ( $viewtag = "1" ) {
You> print "The value of \$view was $view\n";
You> }
That will print all the time. You are assigning 1 to $viewtag, and
that's always true. Maybe you wanted == instead of =?
--
Randal L. Schwartz - Stonehenge Consult
[EMAIL PROTECTED] wrote:
: if ( $viewtag = "1" ) {
: print "The value of \$view was $view\n";
: }
:
: i would have thought that the second statement would not print since the
: form had not been "submitted". however, instead, the if statements' print
: does get stuck into the html.
A pernicio
i currently have a form that is generated by the perl script panel.pl
within the html, i have:
http://localhost/cgi-bin/panel.pl";
method="post">
View the Current List of Aliases
also in the html, i have:
if ($formdata{view_name}) {
$view = $formdata{view_name};
$viewtag = "1";
}
and