Questions about legal user verification

Source: Internet
Author: User
Hello, everyone! I recently started to learn php & nbsp; The logon interface means & nbsp; if the account and password are the same as the database & nbsp; then give a session username & nbsp; check whether the user is valid & nbsp; use include & nbsp; check. php code is & nbsp; if the session is blank & nbsp; new users ask questions about legal user verification
Hello everyone! I recently started to learn the php login interface. This means that if the account and password are the same as the database, then give a session = user name.

Then, check whether the include check. php is valid on each interface.

The code is that if the session is empty, the message is illegal, but the security is poor. Is there any good idea or code? thank you!

I'm sorry, I'm not a newbie.
------ Solution --------------------
$ _ SESSION [''admin _ name] = "" is different from session = ""
------ Solution --------------------
Session_start ();
$ _ SESSION ['username'] = "123 ";
It's a php program, not a form that can be submitted!
Of course, if someone runs to your server to modify your program, it's another thing.

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.