How to Use PHP for page registration review and php for page review

Source: Internet
Author: User

How to Use PHP for page registration review and php for page review

This user record is available after the user is registered. You have set a "review status" field for the user table. The default value is "not reviewed ", then you write a few review codes to form a function. If the review passes, you can change the review status to "reviewed. When you want to perform various operations, you should first judge the audit Status field. If not, it will be blocked and provide some prompt information; otherwise, it will be released.

 

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! ";}

  

 

Logon page

<Body> 

  

Registration logon process page

<? Php $ uid = $ _ POST ["uid"]; $ pwd = $ _ POST ["pwd"]; include ("LZY. class. php "); $ db = new LZY (); $ SQL =" select * from zhuce where uid = '{$ uid }'"; $ arr = $ db-> Query ($ SQL); if ($ arr [0] [1] = $ pwd &&! Empty ($ pwd) {if ($ arr [0] [5]) {header ("location: zcmain. php ");} else {echo" this user has not passed review! ";}} Else {echo" Logon Failed! ";}

  

Registration page

<Body> 

  

Approved code

<? Php $ uid = $ _ GET ["uid"]; include ("LZY. class. php "); $ db = new LZY (); $ SQL =" update zhuce set isok = 1 where uid = '{$ uid }'"; if ($ db-> Query ($ SQL, 0) {header ("location: zcmain. php ");} failed to pass else {echo! ";}

  

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.