udsrem
12-13-2002, 02:33 AM
Is there a way to stop some one from entering a password with spaces in it.
I have this code in my signup code.
# except only letters underscores numbers
unless ($u_name =~ /^[A-Z|a-z|0-9]/) {
print "Sorry not a valid Username <br />"; exit; }
# except only letters numbers decimals
unless ($p_word =~ /^[A-Z\a-z\0-9]/) {
print "Sorry not a valid password <br />"; exit; }
but for some reason it still allows spaces.
how can I stop that from happening.
Thanks,
:(
I have this code in my signup code.
# except only letters underscores numbers
unless ($u_name =~ /^[A-Z|a-z|0-9]/) {
print "Sorry not a valid Username <br />"; exit; }
# except only letters numbers decimals
unless ($p_word =~ /^[A-Z\a-z\0-9]/) {
print "Sorry not a valid password <br />"; exit; }
but for some reason it still allows spaces.
how can I stop that from happening.
Thanks,
:(