?? login.asp
字號:
<!--#include file="conn.asp"-->
<%
dim username,userpwd
username = request.form("username")
userpwd = request.form("userpwd")
dim rs
dim sql
set rs=server.CreateObject("ADODB.RECORDSET")
sql="select * from main where username = '"&username&"' and password='"&userpwd&"'"
rs.open sql,conn,1,1
if not rs.eof then
'Session("username")=rs("username")
username=rs("username")
userpwd=rs("password")
response.write("<script language=javascript>window.alert('登錄成功!');window.location='main.asp'</script>")
else
response.write("<script language=javascript>window.alert('登錄失敗!');window.location='index.asp'</script>")
end if
rs.close
set rs =nothing
conn.close
set conn=nothing
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -