The following code does not seem to allow multiple variables passed 
by checkbox multiple variables.  The test always evaluates true and 
prints my error msg.  Help is much appreciated.

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

foreach $name ($q->param())
{foreach $value ($q->param( $name ))
  {if ($value=~/^([\w\s\:\/\@\,\.\'-]+)$/i)
    {
      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>
</head>
<body>
<center>
<h3>Alert!</h3>
<p align="center">I'm sorry but only letters, numbers, underscores, 
<b>&#064;</b>, hyphens, commas, single apostrophes, and periods. are 
allowed in your form fields.</p>
<p align="center">Please hit the back button of your browser and try again.</p>
</center>
</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