marybailey
Programmer
My html form looks like this:
<input type=checkbox name=active value=no>
On the perl side, I do this:
if ($Config{'active'} eq "no"
{
$active=0; }
else
{ $active=1;}
Then I call this:
sub return_html {
if ($active == 1) {
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<BODY BGCOLOR=#FFFFFF>\n";
print "<CENTER>\n";
print "<img src=\"http:\/\/ print "<BR><BR>Thank you for joining our mailing list, $Config{'realname'}\n";
print "<P>\n";
print "Your emails will be sent to $Config{'email'}\n";
print "<\/CENTER>\n";
print "</BODY>\n";
print "</HTML>\n";
}
}
THE PROBLEM IS WHEN I CHECK THE CHECKBOX SO ITS VALUE IS NO I GET THE INFAMOUS 500 INTERNAL SERVER ERROR. IF I LEAVE IT BLANK EVERYTHING RUNS AS EXPECTED. WHEN I PRINT OUT THE VALUE OF ACTIVE ITS AS EXPECTED: 1 OR 0.
What am I doing wrong?
Thanks,
Mrs B
<input type=checkbox name=active value=no>
On the perl side, I do this:
if ($Config{'active'} eq "no"
$active=0; }
else
{ $active=1;}
Then I call this:
sub return_html {
if ($active == 1) {
print "Content-type: text/html\n\n";
print "<HTML>\n";
print "<BODY BGCOLOR=#FFFFFF>\n";
print "<CENTER>\n";
print "<img src=\"http:\/\/ print "<BR><BR>Thank you for joining our mailing list, $Config{'realname'}\n";
print "<P>\n";
print "Your emails will be sent to $Config{'email'}\n";
print "<\/CENTER>\n";
print "</BODY>\n";
print "</HTML>\n";
}
}
THE PROBLEM IS WHEN I CHECK THE CHECKBOX SO ITS VALUE IS NO I GET THE INFAMOUS 500 INTERNAL SERVER ERROR. IF I LEAVE IT BLANK EVERYTHING RUNS AS EXPECTED. WHEN I PRINT OUT THE VALUE OF ACTIVE ITS AS EXPECTED: 1 OR 0.
What am I doing wrong?
Thanks,
Mrs B