📄 shenqingadd.asp
字号:
<!-- #include file="database/conn.asp"-->
<% dim student_no,gangweitype
student_no=Trim(request.form("student_no")) '用户ID
gangweitype=request.Form("gangweitype")
errmsg =""
if student_no="" then errmsg= "student_no not null "
if gangweitype="" then errmsg=errmsg & " gangweitype not null "
if errmsg<>"" then
%>
<script language="javascript">
alert("<%=errmsg%>")
history.back();
</script>
<% else
Set rs = Server.CreateObject("ADODB.RECORDSET")
sql="select * from shenqing where student_no='"&student_no&"'"
rs.open sql,conn,3,3
if not Rs.eof then
%>
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
<table width=620 height="171" align=left>
<tr>
<td colspan="2" height="38"> <span class="STYLE1">you can not register The num had used by other student!</span></td>
</tr>
<tr>
<td colspan="2" height="52"> </td>
</tr>
<tr>
<td width="193" align=right>
<input type=button value="返回" name=cmdback onclick="history.back()">
</td>
</tr>
</table>
<%
else
rs.AddNew
rs("student_no")=Trim(student_no)
rs("gangweitype")=Trim(gangweitype)
rs.Update
rs.Close
conn.Close
set conn=nothing
set rs=nothing %>
<table>
<tr>
<td>successfull<A href=news.asp> Go back </A></td>
</table>
<%
'Response.Redirect "useradd.asp"
end if
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -