This article mainly introduces the case of php to implement message board function and session control in detail. It has certain reference value. Interested friends can refer to it.
The examples in this article are shared with everyone. The specific code of the php message board function is for your reference. The specific content is as follows
Three tables used in the database
##1. Login interface (denglu.php login.php)
##1.denglu.php
2.login.php
query($sql); if(count($arr)) { if($arr[0][0] == $PassWord && !empty($PassWord)) { //存储用户名 $_SESSION["UserName"] = $UserName; header("location:main.php"); } } else { header("location:denglu.php"); }
1.main.php
无标题文档
留言信息:
发送人 | 发送时间 | 接收人 | 信息内容 |
{$v[1]} | {$v[3]} | {$v[2]} | {$v[4]} |
2 .tuichu.php
Copy after login
##3. Send page (fabu.php fabuchuli.php)
1.fabu.php
2.fabuchuli.phpquery($sql,0); header("location:fabu.php");
php implements singleton mode supplemented by calling instructions
php implements WeChat template message push
php method to implement sending hexadecimal socket
The above is the detailed content of PHP implements message board function (session control). For more information, please follow other related articles on the PHP Chinese website!