登录时想链接Index.asp,链接不了,出现错误
if request("butok")="1" thenif (request.Form("txtusername")<>"") and (request.Form("txtuserpass")<>"") then
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open "select userid,UserName,UserPass,indate from user_link where UserName='"& request.Form("txtusername") &"' and UserPass='"& request.Form("txtuserpass") &"' " ,conn,1,3
if rs.eof then
Response.Write("<script language='javascript' for='window' event='onload'>alert('用户名或者密码有错误');</script>")
else
session("userid")=rs("UserId")
session("indate")=now()
Response.Redirect ("Index.asp")
end if
end if
end if