ASP小问题请教

2025-02-23 08:52:51
推荐回答(1个)
回答1:

user=request.from("username")
select * from reg_user where username="user"

if rs("username")<>"" then
response.write("nothing")

中间代码自己完善,不会js

纯asp代码:
dim username
dim password
dim email
dim tpwd
dim tel
dim address
username=trim(request.Form("username"))
password=trim(request.Form("password"))
tpwd=trim(request.Form("tpwd"))
email=trim(request.form("email"))
tel=trim(request.Form("tel"))
address=trim(request.Form("address"))
if username="" and password="" and tpwd="" and Email="" and tel="" and address="" then
response.write("")
end if
if strcomp(cstr(request.Form("password")),cstr(request.Form("tpwd")))<>0 then
response.write("")
end if

set rs=server.CreateObject("adodb.recordset")
rs.open "select * from member",conn,1,3
if rs.eof then
response.write("")
else
rs.addnew()
rs("username")=request.form("username")
rs("password")=trim(md5(request("password")))
rs("moblie")=request.Form("moblie")
rs("email")=request.Form("email")
rs("tel") = request.Form("tel")
rs("qq") = request.Form("qq")
rs("address")= request.Form("address")
rs("times")=now()
rs.update
rs.close
set rs=nothing
response.write("")
end if

不要用user表,会出错,用member不会