?? adds.asp
字號(hào):
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<%
if session("pass")<>1 then
response.redirect "login.asp"
end if
%>
<%
if request("usr")<>"" then
u=request("usr")
p=request("pwd")
sql="select * from [user] where user='"&u&"'"
set rs=server.createobject("adodb.recordset")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq="& Server.MapPath("exercise.mdb")
rs.open sql,conn,3,3
if rs.eof then
rs.addnew
rs("user")=u
rs("passwd")=p
rs.update
else
response.Write("已經(jīng)有此人賬號(hào)請(qǐng)更換其它")
end if
end if
%>
<body>
<form name="form1" method="post" action="">
<p>學(xué)生登錄賬號(hào):
<input name="usr" type="text" id="usr">
<br>
<br>
學(xué)生登錄密碼:
<input name="pwd" type="text" id="pwd">
</p>
<p>
<input name="sub" type="submit" id="sub" value="添加">
</p>
</form><br>
<a href="adm.asp">刪除成功點(diǎn)擊返回</a>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -