Home >Backend Development >PHP Tutorial >thinkphp留言板怎么写

thinkphp留言板怎么写

WBOY
WBOYOriginal
2016-06-13 11:54:491026browse

thinkphp留言板如何写?
RT,老板让写个留言板,可我thinkphp框架还没学会,写不了啊。。求各位给点思路,到底该怎么写?
------解决方案--------------------
表单就是正常的表单就ok了,form的action='/?m=liuyanban&a=add_liuyan'
action中这么处理
$data['user_id'] = $this->_get('user_id');
$data['content'] = $this->_get('content');
M('liuyan')->add($data);
这就插入数据库了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:$ajax解决方法Next article:关于mysqlnd的迷惑