I did that exact think on my test forum. I am only allowing A-Z, a-z, the _ character a spaces.
here is the code I added to inc_functions.asp:
Function IsAlphaNumeric(fString)
for i = 1 to Len(fString)
strChar = Asc(Mid(fString,i,1))
If (strChar >= 65 and strChar <= 90) or (strChar >= 97 and strChar <= 122) or (strChar >= 48 and strChar <= 57) or (strChar= 32) or (strChar = 95) then
IsAlphaNumeric = True
else
IsAlphaNumeric = False
Err_Msg = Err_Msg & "<li>You have entered an invalid character in your username, for more information see <a href=""JavaScript:openWindow6('faq.asp#usernames')"">here</a>.</li>"
exit function
end if
next
end Function
and then added this to register.asp:
IsAlphaNumeric(Request.Form("Name"))
For what you are wanting just take out the or (strChar= 32) or (strChar = 95) from the function above.