⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 save.asp

📁 一个基于ASP和SQL数据库的学生信息管理系统,可以方便的实现学生信息的添加修改和删除,成绩信息的管理和学生的在线选课.
💻 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 + -