How to present the following results

Source: Internet
Author: User
How to present the following results I mean: there is a login page. if the logon is successful, the check page will jump to the main interface after checking, and then the logon succeeded account will appear on the main interface. How can this be done? for example, no, the session is used to discuss the session, so we can use the cookie .. A. php & lt ;? Filter php // post data. how can I present the following results?
I mean: there is a login page. if the logon is successful, the check page will jump to the main interface after checking, and then the logon account will appear on the main interface. How can this be done? is there an example?

------ Solution --------------------
Session
------ Solution --------------------
Discussion

Session

------ Solution --------------------
You can use cookies ..
A. php
// Filter the post data
If ($ _ POST ['name'] = 'AAA' and $ _ POST ['pwd'] = 'BBB '){
Setcookie ("name", $ _ POST ['name'], time () + 3600 ,"/");
}
?>
Then B. php
Echo $ _ COOKIE ['name'];
?>
------ Solution --------------------
You can use session or cookie. after successful logon, you can record the data of this person and add a judgment on the home page to display the data.

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.