?? teacherreg.asp
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>家教注冊頁面</title>
<style type="text/css">
<!--
body,td,th {
font-size: 14px;
color: #003399;
}
a:link {
color: #003399;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #003399;
}
a:hover {
text-decoration: none;
color: #003399;
}
a:active {
text-decoration: none;
color: #003399;
}
-->
</style></head>
<body>
<!--#include virtual="../inc/head.htm"-->
<p></p>
<form method="post" action="">
<table width="35%" border="0" align="center">
<tr>
<td colspan="2"><div align="center" class="style2">家教注冊</div></td>
</tr>
<tr>
<td width="33%">用戶名:</td>
<td width="67%"><input type="text" name="teacher" size="20"></td>
</tr>
<tr>
<td>密碼:</td>
<td><input type="password" name="pass1" size="20"></td>
</tr>
<tr>
<td>確認密碼:</td>
<td><input type="password" name="pass2" size="20"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="下一步" name="st"><input type="reset" name="rt" value="重置"></td>
</tr>
</table>
</form>
<p></p>
<%
if Request.Form("st")<>"" then
teacher=Request.Form("teacher")
pass1=Request.Form("pass1")
pass2=Request.Form("pass2")
if teacher="" then
Response.Write("用戶名不得為空!")
elseif pass1<>pass2 then
Response.Write("兩次輸入的密碼不同,請重新輸入!")
else
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("db/info.mdb")
strSql="select * from teacherreg where nick='" & teacher & "'"
Set rs=conn.Execute(strSql)
if not rs.EOF then
Response.Write("該用戶名已經存在!")
else
strSql="insert into teacherreg(nick,pass) values('" & teacher & "','" & pass1 & "')"
conn.Execute(strSql)
session("teacher")=teacher
Response.Redirect("teacherdetailreg.asp")
end if
end if
end if
%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -