一个简单的bbs(六)
阅读和跟贴页面的台detail.asp:<html>
<head><title>bbs.asp</title></head>
<body background="backgrnd.gif">
<% idnum=Request.QueryString("ID")
Set connbbs = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("bbs.mdb")
connbbs.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
Set RS=Connbbs.Execute("SELECT * FROM bbs WHERE cstr(ID)="&idnum&"")
connbbs.execute "update bbs set visitnum=visitnum+1 WHERE cstr(ID)="&idnum&"" %>
姓名:<% =RS("authorname") %><p>
主题:<% =RS("subject") %><p>
内容:<% =RS("content") %><p>
<% resub="Re:" & RS("subject")
mtopnum=RS("topnum")
RS.Close
Connbbs.Close %>
<FORM METHOD="POST" ACTION="bbs.asp?ID=<% =idnum %>&topnum=<% =mtopnum %>"><P>
姓名: <INPUT NAME="name" SIZE="28">
密码: <INPUT TYPE="password" NAME="code" SIZE="28"><P>
主题:<INPUT NAME="subject" SIZE="66" VALUE="<% =resub %>"><P>
内容:<P>
<TEXTAREA NAME="content" ROWS=20 COLS=72></TEXTAREA><P>
<CENTER><INPUT TYPE=SUBMIT VALUE="信息回复">
<INPUT TYPE=RESET VALUE="清除信息"></CENTER>
</FORM>
<a href="dispbbs.asp">返回论坛</a>
</body>
</html>
补充:asp教程,高级应用