<%
Function RegExpTest(patrn, strng)
  Dim regEx
  Set regEx = New RegExp
  regEx.Pattern = patrn
  regEx.IgnoreCase = False
  RegExpTest = regEx.Test(strng)
End Function 

If Trim(LCase(Request("username")))="" or RegExpTest("[^A-Za-z0-9]",Request("username")) Then
response.write "error"
response.end
End if

'验证会员资格
If not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
  Set dsreg = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_USER where username='"&Trim(LCase(Request("username")))&"'"
'Response.Write sql
		if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
		dsreg.Open Sql,conn,1,1
If dsreg.Eof Then
response.write "ok"
Else
response.write "error"
end if

dsreg.close
conn.Close
set conn=nothing
end if

%>