dreamstreet
Programmer
$username = param('username');
Hello,
How do i make sure that the user has entered only letters/numbers and not any illegal charters like @_)().
thanks
-a
d
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
unless ($username =~ /^[a-zA-Z0-9]+$/) {
print "You're a naughty boy!\n";
}
if ($username =~ /\W/) {
print "You're a naughty boy!\n";
}
$uname = '(ss))))';
[red]unless[/red] ($uname =~ /^[a-zA-Z0-9]+$/) {
print "User name can only contain letters or numbers.";
}
$uname = '(ss))))';
[red]if[/red] ($uname =~ /\W/) {
print "User name can only contain letters or numbers and the underscore.";
}