Traditional Web BBS is mostly implemented by CGI, its implementation requires programmers to master programming languages such as Perl or C, but also to understand the CGI model of the various technical content, so to make their own web BBs really difficult. ASP (Active Server Pages Dynamic Server home page), so that we see a bright, can use ASP to achieve Web BBS it? Of course the answer is yes. The allure of ASP is that it provides a simple and easy to learn script, with many built-in objects, thus providing a simple way of programming.
The BBS mainly by user registration (browser-side), user registration (server-side), plus posts (browser-side), add posts (server side), post specific content of the display and reply, as well as the display of all posts six parts, where the user information stored in the database Author.mdb, Posts are stored in the database Bbs.mdb. They are all Access databases, which are shown in tables 1, 2, respectively.
Table 1 Author.mdb
Field name data type length description
AuthName Text 24 User name
Password Text 10 password
Table 2 Bbs.mdb
Field name data type length description
ID Text 4 Number of posts
AuthName Text 24 User name
Subject Text 80 Themes
Content Comment Contents
Adddate Date/Time Posted date
Visitnum Digital long-integer visitors
Number of Answernum text 4 reply post
(Default is the number of itself)
Addtime Date/Time Add paste time
Topnum Text 4 Number of the first level reply post
The implementation method is as follows, where ASP files and databases are stored in "/hosp/asp", other HTM
Files are stored in "/hosp" Files, and img files are stored in "/hosp/images".
1, user registration (browser-side) login.htm: the user input relevant information, through the form sent to the service
The service device.
<html>
<head><title> register a new user</title><head>
<body>
<FORM METHOD="POST" ACTION="/hosp/asp/register.asp"><P>
<H2>为了标识方便,请您注册一个用户名称</H2>
用户:<INPUT TYPE="TEXT" name="name" SIZE="24"><P>
密码:<INPUT TYPE="password" name="password" SIZE="24"><P>
<INPUT TYPE=SUBMIT VALUE="注 册">
<INPUT TYPE=RESET VALUE="清 除">
<a href="/hosp/asp/dispbbs.asp">返回论坛</a><P>
</body>
</html>