今天我们来讲一下用php制作简单的留言板,首先来分析一下留言板,
第一步:设计数据库.
第二步:设置html页面,就是留言页面,
第三步:php处理页面,保存到数据库.
第四步:留言显示页面.
好了我们先来看看第一步:
CREATE TABLE IF NOT EXISTS `gx_guestbook` (
`id` int(4) NOT NULL auto_increment,
`gx_title` varchar(200) default NULL,
`gx_content` mediumtext,
`gx_time` datetime default NULL,
`gx_tel` varchar(20) default NULL,
`gx_mail` varchar(50) default NULL,
`gx_object` varchar(100) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gb2312 AUTO_INCREMENT=10 ;
上面是创建数据库这里就没什么好说了.
再来看第二步设置html留言页面
客户留言
上面就是留言的页面了,效果图

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

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version
Recommended: Win version, supports code prompts!

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6
Visual web development tools
