Novice ask legitimate user to verify related issues
Source: Internet
Author: User
Novice Consult legitimate user authentication problem
Hello everyone! I have recently started to learn the PHP landing interface is this meaning if the account and password as the database so give a session= user name
Then at each interface to detect whether legitimate users with include check.php
The main idea of the code is that if the session is empty then prompt illegal but found that the security is very poor what are the good ideas and code?
The novice doesn't have much to be ashamed of
------Solution--------------------
$_session["admin_name]==" "and session==" "not the same.
------Solution--------------------
Session_Start ();
$_session[' username ']= "123";
PHP program, not form can be submitted!
Of course, if someone goes to your server and modifies your program, it's another matter.
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.