php+mysql community communication system

php+mysql community communication system

 

【Abstract】 With the continuous development of computer networks, web pages are gradually integrated into people's lives. Fast and timely news browsing and colorful online information make the network closely related to people's life, so the third media - Internet appeared in the world. It breaks geographical restrictions, truly enables information to be shared, and changes people's work and lifestyle. The official webpage is an important means for companies and individuals to promote themselves. Major companies and personal homepages, including entertainers, writers, college students, etc., have created their own homepages and Web sites to announce their existence and products to the world. , services and personal hobbies, etc. My system is composed of: member login, member registration, forum and so on.

【Keywords】 Forum Database WEB PHP

foreword

At present, most small and medium-sized people use computers to replace the manual procedures. There are many shortcomings in manual completion, such as: low efficiency, poor confidentiality, and over time, a large number of files, data and vouchers will be generated. Finding, updating, and maintaining have all brought a lot of difficulties. With the development of information technology and people's higher and higher requirements for food and entertainment , this kind of manual management can no longer meet the needs of the current high-speed development .

There are many things that no longer need to be recorded manually. This is time-consuming and prone to forgetting and making mistakes. It is easy to cause unnecessary troubles and is also a waste of time . And those things can be replaced by computers now , and life is getting better and better now. In spare time, everyone has more time to discuss and put forward some opinions. If you want to play something, you can just watch it on the Internet. This is the advantage of computers.

1. System overview analysis

The community exchange network provides us with a platform to view or discuss some things through the website, so as to understand some other people's views or opinions, so that we can easily know what we want to find. You don't have to look up information or go out to know something you care about.

2. The software environment established by the community communication network

The community communication network is a set of network management system developed by the WEB server scripting language php and the data server Mysql, and it is designed and completed by Dreamweaver.

2.1 Operating software environment

2.1.1 Apache

Apache is one of the most popular HTTP server software. Fast, reliable, and extensible through a simple API, the Perl/Python interpreter can be compiled into the server, completely free, and completely open source code. If you need to create a web server that is accessed by millions of people every day, Apache may be the best choice. In the field of Web servers in the Internet, Apache occupies an undisputed leading position.

AppServ is a combination package of PHP web site building tools. The author repackages some free site building resources on the Internet into a single installation program to facilitate beginners to quickly complete site building. The main features are high stability, fast speed, and multiple functions. The software included in AppServ includes: Apache, Apache Monitor, PHP, MySQL, phpMyAdmin, etc.

2.1.2 PHP

PHP is the abbreviation of " Hypertext Preprocessor " , which is interpreted as "Hypertext Preprocessor" in Chinese.  PHP is a scripting language that can be embedded in HTML. Its syntax borrows from C, Java, and Perl, while also creating some PHP-specific features. The purpose of the PHP language is to allow web programmers to easily write dynamic web pages.

2.1.3 MySQL

MySQL is a small relational database management system developed by MySQL AB of Sweden. At present, MySQL is widely used in small and medium-sized websites on the Internet. Due to its small size, fast speed, low total cost of ownership, especially the open source feature, many small and medium-sized websites choose MySQL as the website database in order to reduce the total cost of ownership of the website.

2.2 Create software environment

2.2.1 Dreamweaver

Macromedia Dreamweaver is a professional HTML editor for designing, coding, and developing Web sites, Web pages, and Web applications. Dreamweaver also provides a full-featured coding environment, including code editing tools such as code coloring and tag completion; ) and JavaServer Pages (JSP) reference material. Dreamweaver also lets you generate dynamic database-backed web applications using server technologies such as CFML, ASP.NET, ASP, JSP, and PHP. Dreamweaver is fully customizable. You can create your own objects and commands, modify shortcut keys, and even write javascript code to extend Dreamweaver's functionality with new behaviors, property inspectors, and site reports.

2.2.2 Fireworks

Fireworks is a tool software specially designed for network graphics launched by Macromedia. It can edit Web images, edit Web animations, make button navigation bars, menus, etc., and even directly make web pages. At the same time, it has the functions of a variety of traditional graphic production software, and it can perfectly combine bitmap processing and vector processing, so that web graphic designers no longer need to frequently switch between multiple graphic design software. The essence of Fireworks is to create the smallest and highest quality JPEG and GIF images with the least steps, and it is a complete solution for creating and generating web graphics.

3. Database systems

3.1 Establishment of database

Data can only be managed automatically if it is managed by a database. The structure of the data will affect the function of the whole system, and once it is established, it will often cause trouble to modify it. So it is necessary to carefully and carefully establish a complete and reasonable structure from the beginning.

3.1.1 Establish database restaurant (as shown below:)

 

click create

3.1.2 Create system data table: user user3 (as shown below:)

 

4 . Web Design

4.1 Site establishment

Start Dreamweaver, first create a dynamic PHP blank page, as shown in the figure:

 

The default encoding of the new document in the preference parameter is changed to Unicode (TF-8). This is to prevent the occurrence of garbled characters in the future design process. The reason for the problem is that the GB2312 character set is selected in DR, and the database The default character is UTF-8 as shown in the figure:

 

Select "Site", then "Manage Site", and create a new one. In the open "Site Definition" dialog box, click the "Advanced" tab, select "Local Information" in the "Category" list, and set the local information. Note that the address of the local root folder of the local information should be in the same directory as phpmyadmin in the USER of the test server. The default folder in AppServ is the WWW folder, as shown in the following figure:

4.2 Ordering system, as shown in the figure:

Create a new page. D cb.html

 

4.3 The process of making web pages

4.3.1 Home page

New file: index.php

Insert the table first, put in some materials to be placed, some images need to be inserted into the layer, as shown in the figure:

 

First connect to the database, click on the application on the right, and then click on the database. As shown in the picture:

Enter the corresponding content in the MySQL connection window, as shown in the figure:

4.3.2 User login

Insert the record set, the table is user, select id, name, passwrd in the column

Insert form, design login layout

Change the user name text field to id, the password text field to password, and the type to password, insert the "confirm" button, click the + sign of the server behavior in the application on the right, and select the login user for user authentication in the pop-up list, and a pop-up will pop up In the login user dialog box, set the corresponding content as shown in the figure:

 

At this time, the webpage can only display one record. In order to display all the records, this function is provided in the repeated area of ​​dw server behavior.

4.3.3 User Registration

The registered user name is the credential for the user to log in to the system.

Create a new dynamic PHP page, insert the form, and design the layout as shown in the figure:

 

Change the text field of the login name to name, the text field of the password to password, and the type to password, then click the + sign in the server behavior, click Insert record in the list, and the Insert record dialog box will pop up, after inserting, enter Select index.php on the page, as shown in the figure:

 

The result is displayed in the browser as shown in the figure:

 

Modify the text field of the area to name, the text field of the password to password, and insert a table to display the search results. At this time, only one record can be displayed on the web page. In order to display all records, the behavior of the dw server is repeated. Areas provide this functionality, binding the corresponding variables in the form.

In this case, only one record can be displayed on the web page. In order to display all the records, this function is provided in the repeated area of ​​the dw server behavior.

4.3.3 Forum

Create a new dynamic PHP page and design the layout

Insert record set 1, the method is the same as above, the table is user3, select id, name, date, msg in the list, filter none, sort: id is in ascending order. Insert record set 2, the table is user3, select all in the list, filter: id=URL parameter is id, sort none.

5. Problems encountered in the subject and solutions

Chinese characters cannot be displayed. The Chinese characters in the database are displayed as garbled characters. This is caused by a character set mismatch. When creating a dynamic PHP page, pay attention to whether the default encoding in the edited preferred parameters is utf-8 . Option 1 Copy the code given by the teacher to the conn.php code. Solution 2, when creating a database, write: utf8_genral_ci in the MySQL connection proofreading and creation column. If it doesn't work, use UltraEdit to convert the format.

6. Test and upload

First, change the "Access" method of "Remote Information" in "Site Management" to: FTP, set the FTP host to: ftp://www.antlite.com/ , "host directory" is empty, and the user name and password are determined by the teacher Provided, tick the "Automatically upload files to server when saving" column. For other databases, etc., because they were consistent with the server when they were built on their own machines, there is no need to change them. After doing all the above, right-click the entire site - upload, and it will be automatically uploaded to the WEB server.

7 . Summarize

    After the teacher's careful guidance and my own efforts, I finally completed my graduation project. In this graduation project, I have a new understanding of the production of the website. It is not as simple as I thought before. It is still difficult to make a good website, but I found that as long as I work hard, I am willing to work hard. can also be done.

Of course, it is not an easy task to complete this design. Some things cannot be solved, so I need to ask the instructor, and the teacher will give me the answer patiently so that I can do better. I have a better understanding and learned a lot of extra Thanks to Mr. Luo for his careful guidance.

【references】  

1. " PHP and MySQL 5 Programming "   (USA) by Gilmore   People's Posts and Telecommunications Press

2. " Proficient in PHP+MySQL Application Development " edited by   Wang Shi and Yang Yingna People's Posts and Telecommunications Press  

3. " PHP&MySQL Website Construction Collection "    Huang Jingwei   Tsinghua University Press

4. " PHP & MySQL Web Network Programming "   Guo Jinfeng Lin Yu et al   People's Posts and Telecommunications Publishing House

5. " PHP & MYSQL WEB" People's Posts and Telecommunications Press

6. 《Dreamweaver mx2004》   http://www.3lian.com/zl/2004/10-5/234435.htm    http://www.3lian.com/zl/2004/10-5/234640.html    

7. 《falsh制作          lhttp://www.3lian.com/zl/3lian/23/2301.html

 

Pay attention to the blogger, the next article is more exciting

One-click three-in-one! ! !

One-click three-in-one! ! !

One-click three-in-one! ! !
Thanks for the one-click triple! ! !

Guess you like

Origin blog.csdn.net/m0_56073435/article/details/131475758