Home>Article>Backend Development> Detailed introduction on how to use PHP to perform page registration and auditing
This article mainly introduces the method of page registration and review using PHP. It has a very good reference value. Let’s take a look at it with the editor.
After the user registers, there will be this user record. You set an "Audit Status" field in the user table, and the default value is set to "Unknown". "Audit", then you write a few sentences of audit code to make a function. If the audit passes according to your wishes, you can just change the audit status to "Audited". When the user wants to perform various operations, you first determine the audit status field. If it is not audited, block it and give some prompt information. Otherwise, let it go.
Registration page
注册页面
##Registration processing page
query($sql,0)) { header("location:zhuceyemiandenglu.php"); } else { echo "注册失败!"; }
Login page
页面登录
Registration login processing page
Query($sql); if($arr[0][1] == $pwd && !empty($pwd)) { if($arr[0][5]) { header("location:zcmain.php"); } else { echo "该用户尚未通过审核!"; } } else { echo "登录失败!"; }
Registration main interface
用户审核
用户名 | 姓名 | 性别 | 生日 | 操作 |
{$v[0]} | {$v[2]} | {$v[3]} | {$v[4]} | {$str} |
Audit passing code
Query($sql,0)) { header("location:zcmain.php"); } else { echo "通过失败!"; }The above is the details of how to use PHP to achieve page registration and auditing The content of the introduction, for more related content, please pay attention to the PHP Chinese website (m.sbmmt.com)!