set rs=server.CreateObject("adodb.recordset")
rs.open "select * from Member where hw_name='"&LCase(trim(request.form("hw_name")))&"'" ,conn,1,1
'LCase(String) 用来把所有编号转换成小写并验证是否重复,防止大小写编码用户共存!
if rs.recordcount>0 then
response.write "<script language=javascript>"
response.write "alert('对不起,已经有此用户名,请重新输入!');"
response.write "this.location.href='vbscript:history.back()';</script>"
Response.end
else
[此贴子已经被作者于2007-3-2 12:04:58编辑过]