How do you check for the null set or blank with checkboxes using 
CGI.pm?  The following code does not work for checkboxes though it 
does for all other input fields.

#TEST FOR BAD CHARS
my ($name, $value);

foreach $name ($q->param())
{foreach $value ($q->param( $name ))
  {#CK FOR BLANKS
   if ($value eq "" || $value eq " ")
   {print <<"PrintTag";
<html>
<head>
<STYLE type="text/css">
<!--
BODY {
background-color: #ffffcc;
font-size: 12pt;
color: #000066;
text-align: center
}
H1 {
font-size: 14pt
}
-->
</STYLE>
<title>Alert!</title>
</head>
<body bgcolor="#ffffcc" color="#000066">
<center>
<h3>Alert!</h3>
<p>All fields are required.<br>Please push the back button on your 
browser and try again.
</p>
</body>
</html>
PrintTag
   exit(0);
   }
}


-------------------------------
-  Teresa Raymond             -
-  [EMAIL PROTECTED]   -
-  http://www.mariposanet.com -
-------------------------------

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to