guestbook資料表
CREATE TABLE `guestbook` (
`gid` int(11) NOT NULL,
`name` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
`content` text COLLATE utf8mb4_unicode_ci NOT NULL,
`dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
ALTER TABLE `guestbook`
ADD PRIMARY KEY (`gid`);
ALTER TABLE `guestbook`
MODIFY `gid` int(11) NOT NULL AUTO_INCREMENT;
insert.php---html
<form id="form1" method="post" name="guestbook">
<p>您的大名:<input name="name" required="required" size="20" type="text" /></p>
<p>您的email:<input name="email" required="required" size="20" type="email" /></p>
<p>留言內容:<textarea cols="20" name="content" required="required" rows="20"></textarea></p>
<p><input name="submit" type="submit" value="送出" /></p>
</form>
list.php--html
<tr>
<td>編號</td>
<td>name</td>
<td>email</td>
<td>內容</td>
<td>時間</td>
<td>動作</td>
</tr>