Php message board creation tutorial

Source: Internet
Author: User
This article provides php beginners with an article from database creation to the final process of reading and writing message boards. For more information, see. the code for creating a data table instance is as follows: CREATETABLE 'Mes... this article provides php beginners with an article from database creation to the final process of reading and writing message boards. For more information, see.

The code for creating a data table instance is as follows:

CREATE TABLE `message` (     `id` tinyint(1) NOT NULL auto_increment,     `user` varchar(25) NOT NULL,     `title` varchar(50) NOT NULL,     `content` tinytext NOT NULL,     `lastdate` date NOT NULL,     PRIMARY KEY (`id`)     ) ENGINE=InnoDB DEFAULT CHARSET=gbk AUTO_INCREMENT=1 ;

Database Connection file database connection code is relatively fixed. first create a new conn. php file and enter the following code:

The instance code is as follows:

 

Write the add. php file on the posting page and enter the following code:

The instance code is as follows:

  
Post message box

Write the message list file to create the file list. php, and enter the following code:

The instance code is as follows:

  
 
Title: User:
Published content:

Note: this is only an entry-level php Tutorial. if you want to use it for the network, please perform some security and SQL injection filtering. Otherwise, it will be very insecure.


Tutorial link:

Reprint at will ~ However, please keep the tutorial address★

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.