1. User Registration page
Page effect:
The code is as follows:
<! DOCTYPE html>
PHP processing
<?php$uid = $_post["UID"]; $pwd = $_post["pwd"]; $name = $_post["name"]; $sex = $_post["Sex"]; $birthday = $_post[" Birthday "]; $code = $_post[" code "];require_once"./dbda.class.php "; $db = new Dbda (); $sql =" INSERT INTO UserInfo values (' {$uid} ', ' {$pwd} ', ' {$name} ', ' {$sex} ', ' {$birthday} ', ' {$code} ', 0) '; $r = $db->query ($sql, 1), if ($r) { header ("location:login.php");} else{ echo "Login failed!";}
2. User Login Page
Page effect:
The code is as follows:
<! DOCTYPE html>
PHP processing
<?php$uid = $_post["UID"]; $pwd = $_post["pwd"];require_once "./dbda.class.php"; $db = new Dbda (); $sql = "SELECT * F Rom userinfo where uid= ' {$uid} ' "; $arr = $db->query ($sql, 0); if ($arr [0][1]== $pwd &&!empty ($pwd)) { if ($ Arr[0][6]) { echo "login succeeded!";} else{ echo "This account has not been approved!";}} else{ echo "username or password wrong!";}
3. Admin Review page
Page effect:
The code is as follows:
<! DOCTYPE html>
$status = $v [6]? " <span style= "> Passed </span>": "<a href= ' reviewchuli.php?uid={$v [0]} ' style= ' Color:blue ' > via </a > "; echo "<tr> <td>{$v [0]}</td> <td>{$v [1]}</td> <td>{$v [2]}</td > <td>{$v [3]}</td> <td>{$v [4]}</td> <td>{$v [5]}</td> <td>{$status}</td> </tr> "; } ? > </tbody> </table> </body>
PHP processing
<?php$uid = $_get["UID"];require_once "./dbda.class.php"; $db = new Dbda (); $sql = "Update UserInfo set Status=1 where UI D= ' {$uid} ', $arr = $db->query ($sql, 1), if ($arr) { header ("location:administrators.php");} else{ echo "Audit failed!";}