About the HTML login interface.

Source: Internet
Author: User
About the HTML login interface .. Help !!! I am working on a small website. I need to log on to the website to perform subsequent operations! For example, I have three pages,. php, B. php, c. php. page a is used for login. only after Page a is successfully logged on Can Page B or c be entered! If you want to skip a and access B, the page is automatically forwarded to! How can I design this! Help !! About the HTML login interface .. Help !!!
I am working on a small website. I need to log on to the website to perform subsequent operations! For example, I have three pages,. php, B. php, c. php. page a is used for login. only after Page a is successfully logged on Can Page B or c be entered! If you want to skip a and access B, the page is automatically forwarded to!
How can I design this! Help !!!!!

------ Solution --------------------
I am a newbie in a relatively simple way and can have some restrictions, but these two may have problems. it is best to wait for other veterans,
Give a relatively complete method

If the post method is used
If ($ _ SERVER ['request _ method'] = 'post') {your page}
Else {
Echo" ";
}


If ($ name = ""){
Echo "you are not logged on and cannot access this page ";
Echo"
";
Echo "redirecting to the logon page ";
Echo" ";
}
Else {page to be displayed}

------ Solution --------------------
You can use session. when the user completes all login operations and the user name and password entered are correct, $ _ SESSION ['status'] = 1, in this way, you can. check whether $ _ SESSION ['status'] exists or is assigned a value at the beginning of the php page. if the check is normal, you can browse the page. Otherwise, the page automatically jumps to. php page.

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.