📄 save.asp
字号:
<!--#include file="..\inc\conn.asp"-->
<!--#include file="..\inc\SessionCheck.asp"-->
<%
dim stuid,stuname,stusex,stubirth,stuclass
if request("op")="insert" then
stuid=Request.Form("user_number")
end if
if request("op")="modify" then
stuid=Request("id")
end if
stuname=Request.Form("user_name")
stusex=Request.Form("user_sex")
stubirth=Request.Form("user_time")
stuclass=Request.Form("user_class")
Call DBConnBegin()
if request("op")="insert" then
sSql="insert into StuInfo Values('"&stuid&"','"&stuname&"','"&stusex&"','"&stubirth&"','"&stuclass&"')"
end if
if request("op")="modify" then
sSql="update StuInfo set stuname='"&stuname&"',StuSex='"&stusex&"',StuBirth='"&stubirth&"',class='"&stuclass&"' where StuID='"&stuid&"'"
end if
oRs.open sSql,oConn,3,3
Call DBConnEnd()
if request("op")="insert" then
Response.redirect "add.asp"
end if
if request("op")="modify" then
Response.redirect "list.asp"
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -