Challenge the best guestbook source code (1)_PHP tutorial

WBOY
Release: 2016-07-21 16:03:33
Original
943 people have browsed it

Instructions for using the guestbook


Haha, I am very happy. I have been working on the guestbook for a long time and I can finally publish it...
Ah, I hope everyone likes it. It doesn’t matter if you don’t like it, but, There must be a reason why you don't like it, please let me know!!!
Thank you!!!

The goal of this guestbook from the beginning is to ""challenge the best guestbook""!!! Me I think "There is nothing I can't do, I just want to see if it is necessary"!!!

If your suggestion is good, I will definitely fulfill your request. My goal is: "Make a great program Member".



The advantages and disadvantages of this guestbook:
--------------------- ------------------------------------------------
This is probably the most It’s important. Haha!!! There is a certain number of words, which means that regardless of your line breaks, they will be wrapped for you. If you want to post text graphics, there will be a problem.) Most guestbooks now do not implement automatic line breaks, which means that it No matter how many characters you write in a sentence, they will all be displayed on one line. If there is a message without line breaks, the message book will become ugly, and the lines under the window will be very long, destroying the beauty of the leaf surface! !!.

As of today, I have not found a message that can solve these two problems at the same time, which is why I wrote this message.

Including oso forums, too If you don’t believe it, try leaving a message. Write a very long character without a carriage return, and problems will immediately appear on the leaf surface. (I mentioned this problem to oso, but I don’t know if it has been changed!)

I wrote a computer_message($msg); function to solve this problem, you can see the source code in the config.php file.

There is also pagination: you can view it in two ways, One is: displaying messages forward and backward, and the other is: displaying the number of pages.

Moderators can now easily delete and restore through the link below, of course they must enter a password.

Disadvantages:

Of course, I have to be realistic, but the beautification work of the page is not enough. Although it is necessary, due to time constraints, I always feel that it is external. You can drag things first. Of course, anyone with a little knowledge of HTML can easily modify them.

There are also unknown BUGs! Haha!!!


Download point , and samples can be found at http://little.oso.com.cn! ! !


Because the help file is written under Linux, you need to use WordPad to open readme.txt
Don’t use Notepad, otherwise the code will be garbled! ! !

The following are configuration instructions:
-------------------------------- --------------------------------
For the convenience of configuration, the code has been rearranged and now all The parameters that need to be set are all placed in the
config.php file. It should be very simple to configure, and there are detailed instructions in it.

Goal: Complete your guestbook within ten minutes!!!

1: Create a database (the homepage must provide database space)

Generally, there is a front-end of phpMyAdmin open source like oso. It is very simple since creation.

Get it After the name, remember to change $db_name in config.php to this name

2: Create a message table (change $table_name in config.php to the name you gave here later).

The structure is:
key_liuyan int(11) auto_increment primary key, // Mainly built, automatically incremented
nikename varchar(20) null // Nickname
subject varchar(100) null                                                                                                                                                                                                                                       > Date_created varchar (19) // Message time
ip_address varchar (15) // The IP address of the message
Message Mediumtext Null // Message information
Email_Address Varchar (50) null // The message -Mail address zhuye_address varchar (50) null // The homepage address of the message
huifu_biaozi int (1) default 0 // Moderator replies
Huifu Mediumtext null OICQ VARCHAR (20) NULL // The OICQ number of the message

can be done with the following SQL !!! (I have passed it, remember to change the yourtable_name to a good note,
Of course not to change it. OK)

create table your_liuyan_table(
key_liuyan int(11) auto_increment primary key,
nikename varchar(20) null,
subject varchar(100) null,
date_created varchar(19) ,
ip_address varchar(15),
message mediumtext null,
email_address varchar(50) null,
zhuye_address varchar(50) null,
huifu_biaozi int(1) default 0,
huifu mediumtext null,
oicq varchar(20) null
)

3: Create a control table: (Also put the name here in $table_name_control of config.php inside)

The structure is as follows:

leibie varchar(20) primary key,
value varchar(20) null

You can also use the following SQL statement:

create table your_control_table(

leibie varchar(20) primary key,
value varchar(20) null
)

Because this is your control table, So you need to add two control records yourself;

The SQL statement is:

Insert and delete password:

insert into your_control_tble(
leibie,
value)
values ​​
(delete,'1332');

Insert reply password:

insert into your_control_tble(
leibie,
value)
values ​​
(huifu,'1332');

Put the password like this is: 123, the user name is empty!

How to calculate the relationship between the password and the inserted value?

It’s like this, your password, such as 123, add the three digits Up, equal to 6, and then multiply 6 times 222 to get the password value!!!

6*222=1332.

Knowing this relationship, of course you can change it to another password.

But the user name must be empty,,,


The principle of simple encryption can be found in the three-digit number on the homepage http://cxg168.126.com.


4: Once everything is done, just upload the files except readme.txt.



If you have any questions, please contact me.


The following is how to contact me (comments returned):
--------------------------------- -----------------------------------------------
?My guestbook: http:/ /little.oso.com.cn
My OICQ: 873221
My e-mail: cxg168@sohu.com

------------- -------------------------------------------------- -----

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/316202.htmlTechArticleInstructions for using the guestbook. Haha, I am very happy. I have been working on the guestbook for a long time and I can finally publish it... Ah, I hope everyone likes it. It doesn’t matter if you don’t like it, but there must be reasons for not liking it, annoying...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template