<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <form action="" method="post"> 标 题: <input type="text"><span>{$errorInfo.title}</span><br><br> 信 息: <input type="text"><span>{$errorInfo.msg}</span><br><br> 留言人: <input type="text"><span>{$errorInfo.user}</span><br><br> <input type="submit" value="提交"> </form> </body> </html>
视图 文件名 upd.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <div> <form action="__SELF__" method="post" > <input type="hidden" value="{$info.id}"> <table> <tr> <td>留言时间</td> <td><input type="text" value="{$info.update_time}" /></td> </tr> <tr> <td>留言人</td> <td><input type="text" value="{$info.user}" /></td> </tr> <tr> <td>标题</td> <td><input type="text" value="{$info.title}" /></td> </tr> <tr> <td>内容</td> <td><input type="text" value="{$info.msg}" /></td> </tr> <tr> <td>回复</td> <td><textarea>{$info.replay}</textarea></td> </tr> <tr> <td colspan="2"> <input type="submit" value="修改"> <a href="https://www.jb51.net/__CONTROLLER__/index" ><input type="button" value="返回"></a> </td> </tr> </table> </form> </div> </body> </html>
目录结构
数据库 sql语句
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- 資料庫: `msg` -- -- -------------------------------------------------------- -- -- 表的結構 `ms_msg` -- CREATE TABLE IF NOT EXISTS `ms_msg` ( `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键', `admin_user` varchar(100) NOT NULL COMMENT '管理员', `update_time` int(10) NOT NULL COMMENT '更新时间', `status` int(2) NOT NULL COMMENT '状态', `send_msg_time` int(10) NOT NULL COMMENT '留言时间', `user` varchar(100) NOT NULL COMMENT '留言人', `title` varchar(100) NOT NULL COMMENT '标题', `msg` varchar(200) NOT NULL COMMENT '内容', `replay` varchar(200) NOT NULL COMMENT '回复', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='留言表' AUTO_INCREMENT=19 ; -- -- 轉存資料表中的資料 `ms_msg` -- INSERT INTO `ms_msg` (`id`, `admin_user`, `update_time`, `status`, `send_msg_time`, `user`, `title`, `msg`, `replay`) VALUES (1, 'ms', 1479449110, 1, 1479449110, '1', '拉克丝的减肥', '对方科目了', 'NULL'), (7, '', 321423432, 0, 0, 'kljflwk', 'kjsdfnlk', 'nlkdsjfn', 'kljnf'), (3, 'ms', 1479451017, 1, 1479451017, '1', '轻松的发生我', '沃尔沃飞', 'NULL'), (8, 'ms', 1479544687, 1, 1479544687, '', 'qwe', '', 'NULL'), (9, 'ms', 1479544693, 1, 1479544693, 'qwe', 'qwe', 'qwe', 'NULL'), (10, 'ms', 1479544970, 1, 1479544970, 'qwe', 'qwe', 'qwe', 'NULL'), (11, 'ms', 1479544979, 1, 1479544979, '12', '12', '12', 'NULL'), (12, 'ms', 1479545029, 1, 1479545029, '12', '12', '12', 'NULL'), (13, 'ms', 1479546357, 1, 1479546357, '12', '12', '12', 'NULL'), (14, 'ms', 1479547163, 1, 1479547163, '12', '12', '12', 'NULL'), (16, 'ms', 1479547667, 1, 1479547667, '12', '12', '123', 'NULL'), (17, 'ms', 2147483647, 1, 1479547682, '上来昆明3', '说的了付款', '蓝山咖啡', '123213'); /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;