do_addsumit.asp
来自「实验教学系统 很好用 有学生 老师 管理等模块 便于学校使用」· ASP 代码 · 共 21 行
ASP
21 行
<%
'读取文本框的值
tusername = Request("tusername")
tmobile = Request("tmobile")
tEmail = Request("tEmail")
tphone = Request("tphone")
tmemo = Request("tmemo")
'连接数据库并插入数据
set conn = Server.CreateObject("ADODB.Connection")
Conn.Open("driver={SQL Server};database=pubs;"&_
"server=localhost;uid=sa;pwd=")
set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = conn
sql = "INSERT INTO txl VALUES('" & tusername & "','" & tEmail &_
"','" & tmobile & "','" & tphone & "','" & tmemo & "')"
cmd.CommandText = sql
cmd.Execute()
'返回
Response.Redirect("index.asp")
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?