close

<%
'*****************************************************************
'  add.asp
'*****************************************************************
'接收資料
actname=Request("actname")
name=Request("name")
id=Request("id")

'建立資料庫連結物件
    Set CN = Server.CreateObject("ADODB.Connection")
    DBPath = Server.MapPath("report.mdb")
'連結資料庫    
    CN.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ="&DBPath
'建立資料庫存取物件    
    Set RS=Server.CreateObject("ADODB.Recordset")
'寫入資料    
     
     Function chgStr( data )
   chgStr = "'" & Replace( data, "'", "''" ) & "'"
End Function
sql = "Insert Into " & actname &" (姓名, 學號) Values ("
sql = sql & chgStr(name) & ", "
sql = sql & chgStr(id) & ")"
CN.Execute sql

%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>線上報名</title>
<!---本教學文件由Valor工作室 小誌撰寫  www.twbts.com --->
</head>

<body>

<p align="center"><img border="0" src="tit.gif" width="231" height="40"></p>
<p align="center">你已經順利完成<font color="#FF3300"><%=actname%></font>研討會報名</p>

<hr width="80%" color="#FF9900">
<form method="POST" action="list.asp">
 
  <p align="center">
  <input type="hidden" value="<%=actname%>" name="actname">
  <input type="submit" value="查看已參加人員" style="background-color: #008000; color: #FFFFFF; border-style: groove"></p>
</form>
 
</body>
 
</html>

 

arrow
arrow
    全站熱搜

    Lady 95 發表在 痞客邦 留言(0) 人氣()