Simple implementation of PHP message board function, php message board
The example in this article shares the specific implementation code of the PHP message board function for your reference. The specific content is as follows:
HTML code
<Div class = "continer"> <div class = "head" style = "background-color: rgb (217,237,247); height: 50px; vertical-align: middle ">
PHP code
public function hierarchicalauthority(){ if(isset($_POST['liuyan'])) { $data['nickname']=$_POST['nickname']; $data['content']=$_POST['content']; $data['email']=$_POST['email']; $data['status']=1; $data['replytime']=date('Y-m-d H:i:s',time()); // print_r($data);die(); $user=M('daili_liuyan_guestbook'); $maxid=$user->max('id'); $data['id']=$maxid+1; $user->add($data); // print_r($_POST);die(); } $guestbook = D('daili_liuyan_guestbook')->select(); $this->assign('guestbook',$guestbook); $this->display();}
Data Table:(Table Name: daili_liuyan_guestbook)
Finally:
Thank you ~
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.