PHP Registration Review

Source: Internet
Author: User

Registration page

<body>

Registration Processing Page

<?PHP$uid=$_post["UID"];$pwd=$_post["PWD"];$name=$_post["Name"];$sex=$_post["Sex"];$birthday=$_post["Birthday"];$sex=$sex= = "Male"?true:false;include(".. /dbda.php ");$db=NewDbda ();$sql= "INSERT into Users values (' {$uid}‘,‘{$pwd}‘,‘{$name}‘,{$sex},‘{$birthday} ', False) ';if($db->query ($sql, 0)){    Header("location:zhuce.php");}

Login Page

<body>

Login Processing Page

<?PHPSession_Start();$uid=$_post["UID"];$pwd=$_post["PWD"];include(".. /dbda.php ");$db=NewDbda ();$sql= "SELECT count (*) from the Users where Uid = ' {$uid} ' and pwd= ' {$pwd} ' and Isok=true ';$z=$db->strquery ($sql);if($z= = 1){    $_session["UID"]=$uid; Header("location:main.php");}Else{    Header("location:login.php");}

Audit Revocation Page

<body>PHPinclude(".. /dbda.php "); $db=NewDbda (); $sql= "SELECT * FROM Users"; $attr=$db->query ($sql); foreach($attr  as $v)    {        //Processing Status        $zt= ""; if($v[5])        {            $zt= "<span style= ' background-color:green;color:white ' > passed </span><a href= ' chexiao.php?uid={$v[0]} ' > Undo </a> "; }        Else        {            $zt= "<a href= ' shenhe.php?uid={$v[0]} ' > Audit </a> "; }                Echo"<tr> <td>{$v[2]}</td> <td>{$v[3]}</td> <td>{$v[4]}</td> <td>{$zt}</td> </tr>"; }        ?></table></body>

Audit Processing page

<?PHP$uid=$_get["UID"];include(".. /dbda.php ");$db=NewDbda ();$sql= "Update Users set isok=true where uid= ' {$uid}‘";if($db->query ($sql, 0)){    Header("location:main.php");}Else{    Echo"Audit Failed!" ";}

Undo Processing Page

<?PHP$uid=$_get["UID"];include(".. /dbda.php ");$db=NewDbda ();$sql= "Update Users set Isok=false where uid= ' {$uid}‘";if($db->query ($sql, 0)){    Header("location:main.php");}Else{    Echo"Undo Failed!" ";}

PHP Registration Review

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.