Challenge the best guestbook source code (1)_PHP tutorial
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
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
------------- -------------------------------------------------- -----

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python are both high-level programming languages that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version
Useful JavaScript development tools