This article mainly introduces the method of using PHP to do the page registration audit. Have a good reference value, follow the small series together to see it
User registration after the user record, you set an "Audit status" field on the user table, the default value is set to "not approved", and then you write a few lines of audit code to make a function, according to your wishes if the audit through you to the status of "audited" on the line. Users want to do a variety of operations, you first determine the Audit status field, if not approved to block and give some information, or release.
Registration page
<body >
Registration Processing Page
<?php$uid = $_post["UID"]; $pwd = $_post["pwd"]; $name = $_post["name"]; $sex = $_post["Sex"]; $birthday = $_post[" Birthday "];include (" LZY.class.php "); $db = new LZY (); $sql =" INSERT INTO Zhuce VALUES (' {$uid} ', ' {$pwd} ', ' {$name} ', ' {$ "Sex} ', ' {$birthday} ', 0)", if ($db->query ($sql, 0)) {header ("location:zhuceyemiandenglu.php");} else{echo "Registration failed! ";}
Login Page
<body>
Register Login Processing Page
<?php$uid = $_post["UID"]; $pwd = $_post["pwd"];include ("LZY.class.php"); $db = new LZY (); $sql = "SELECT * FROM Zhuce WH Ere uid= ' {$uid} ', $arr = $db->query ($sql), if ($arr [0][1] = = $pwd &&!empty ($pwd)) {if ($arr [0][5]) { Header ("location:zcmain.php"); } else { echo "the user has not passed the audit!" "; }} else{echo "Login failed! ";}
Register the main interface
<body>
Audit through code
<?php$uid = $_get["UID"];include ("LZY.class.php"), $db = new LZY (), $sql = "Update zhuce set isok=1 where uid= ' {$uid} '"; F ($db->query ($sql, 0)) {header ("location:zcmain.php");} else{echo "Through failure! ";}
Above is how to use PHP to do page registration audit details of the content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!