Home>Article>Backend Development> Detailed introduction on how to use PHP to perform page registration and auditing

Detailed introduction on how to use PHP to perform page registration and auditing

黄舟
黄舟 Original
2017-03-04 14:04:18 1649browse

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

 

用户审核

Query($sql); foreach($arr as $v) { $str = $v[5]?"已通过":"通过"; echo ""; } ?>
用户名 姓名 性别 生日 操作
{$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)!



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