Simple user login using cookies without session and database

Source: Internet
Author: User
I only use cookies and do not use session and database for a super simple user login. for help, I only use cookies instead of SQL. I just got in touch with PHP. after the teacher spoke about cookies, he directly assigned jobs, I personally think there is no clue. Three pages are required: home page. php, login page. php, Appendix. php (links provided on the homepage) requires that you use cookies instead of session and database for a simple user login before logon.
I only use cookies without SQL. I just got in touch with PHP. after the teacher talked about cookies, he directly assigned homework. I personally think there is no clue.


Currently, three pages are required: home page. php, login page. php, and attachment page. php (links to the attachment page are provided on the home page)

It is now required that the home page be accessed before logon. php and the appendix. php has "log in" text, but after logging in, "log in" becomes "log out" and points to the homepage after logging out. php. ("Logged out" or similar transition pages are not required)

I can use php to create a login interface, hidden content, and content on a page at the same time, but I don't know how to use cookies to achieve login. php can also achieve the login effect after clicking the page.

The cookie is saved for one year.

All scores are sent out. hope to get help. all replies are good. thank you!

------ Solution --------------------
Paste the part you have completed

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.