How to use PHP to do page registration audit detailed introduction

Source: Internet
Author: User
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)!

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.