& Nbsp; I believe that everyone who has been to OSO will leave a deep impression on the OSO Forum, this forum is outstanding in any aspect. If you don't want your homepage to have such a beautiful forum, it's not very complicated. here we will only implement OSSyntaxHighl from some basic aspects.
I believe that everyone who has been to OSO will leave a deep impression on the OSO Forum, which is both outstanding in that aspect. If you don't want your homepage to have such a beautiful forum, it is not very complicated. below we will only imitate the OSO Forum from some basic aspects.
Since I only use this forum as my message board, my forum can be regarded as a simple configuration of the OSO Forum. 1. in my forum, the user can only speak after login. the user ID is included in a cookie variable named "cookie_user". 2. my forum has no sub-forum, 3. I did not count the clicks on a topic. 4. I have not designed any icons for new posts in front of each topic in the OSO Forum, 5. I did not consider the optional topic arrangement methods and display time periods provided by the OSO Forum. 6. no member posting points statistics. 7. no moderator management forum function, 8. no sub-editing function is available. We will talk about how to expand these eight functions based on my program.
The first is the design of a database. In fact, a forum involves two data tables. now we name them user and guestbook, and the user table stores the information of registered users. The creation statement is as follows:
Create table my_user (
User_id char (12) not null,/* User name */
User_password varchar (8) not null,/* User password */
Prima (the most comprehensive VM Management System) ry key (user_id)
)
The post content is stored in the guestbook. The created content is as follows:
Create table guestbook (
Id bigint DEFAULT 0 not null auto_increment,/* speech id, auto-increment field */
Name varchar (12) not null,/* topic creator */
Type tinyint not null,/* type 0-reply; 1-primary sticker */
Theme varchar (50) NULL,/* topic */
Content blob not null,/* content */
Icon tinyint not null,/* emoticon icon */
Time_open datetime not NULL,/* topic creation time */
Time_close datetime not NULL,/* last reply time */
Answer_count int not null,/* number of replies */
Answer_name varchar (12) not null,/* last responder */
Main_id bigint null,/* primary id */
Prima (the most comprehensive VM Management System) ry key (id )/**/
);
The program contains five php (as the mainstream development language) source code: connect. inc. php (as the mainstream development language), faq. php (as the mainstream development language), read. php (as the mainstream development language), post. php (as the mainstream development language), reply. php (as the mainstream development language) and post_end.php (as the mainstream development language)
Connect. inc. php (as the mainstream development language): (used to connect to the database)
$ Dbhostname = "localhost ";
$ Dbusername = "";
$ Dbpassword = "";
$ DbName = "";
MySQL (best combination with PHP) _ CONNECT ($ dbhostname, $ dbusername, $ dbpassword) or die ("Unable to connect to database ");
@ MySQL (best combination with PHP) _ select_db ("$ dbName") or die ("Unable to select database ");
?>
Faq. php (as the mainstream development language): (used to display the topic list)
Problem