Hello Jim,
I noticed a response telling you to use JavaScript to validate your
form input.
Personally I browse with my JavaScript turned off to avoid pop-up ads
so I don't believe it is a good idea to try to validate information
using it.
Here is an excerpt from my Sams book that could help you with
solving the problem:
print_header;
my $return=param("return_addr");
if (! defined $return or ! $return) {
print "You must supply an e-mail address<P>";
exit;
}
my $subject=param("subject");
if (! define $subject or ! $subject) {
print "You must supply a subject<P>;
exit;
}
Of course you will still have to verify that the info is in the proper
format yourself. But, I believe that by doing this way, you will be
assured of ACTUALLY getting ALL the form data in the first place.
--
Best regards,
K.L. Hayes
mailto:[EMAIL PROTECTED]
+=====================================================+
+ "Only two things are infinite, the universe and +
+ human stupidity, and I'm not sure about the former."+
+ -- Albert Einstien +
+=====================================================+
Friday, July 13, 2001, 8:17:20 AM, you wrote:
SJR> I've created a CGI program that asks a user to fill in a number of fields.
SJR> I would like to validate that the required data is present and in correct
SJR> format.
SJR> A date, time, phone number, Ip Address etc.
SJR> Obviously I could code a number of regex's, but I was wondering if there was
SJR> a module or script
SJR> that I could use along with CGI.pm.
SJR> Any Suggestions ?
SJR> Regards,
SJR> JimBob
--
Best regards,
K.L. Hayes
mailto:[EMAIL PROTECTED]
+=====================================================+
+ "Only two things are infinite, the universe and +
+ human stupidity, and I'm not sure about the former."+
+ -- Albert Einstien +
+=====================================================+
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]