in reply to Checking input
#!/usr/bin/perl -w use strict; use CGI; my $q = new CGI; # print a header print $q->header; # get param value using CGI ie <input type="text" name="param_name"> my $input = $q->param('param_name'); print "<h3>Test</h3>\n"; print "<p>'$input' is alphanumeric</p>" if $input =~ m/^[a-zA-Z0-9_'-] ++$/; print "<p>'$input' is integer</p>" if $imput =~ m/^\d+$/;
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Checking input
by skirrow (Novice) on Feb 25, 2003 at 20:44 UTC |