新手请问合法用户验证有关问题

WBOY
Release: 2016-06-13 11:52:50
Original
804 people have browsed it

新手请教合法用户验证问题
大家好!我最近开始学php   登陆界面是这个意思 如果账号和密码与数据库一样 那么给一个session=用户名 

然后在每个界面检测是否合法用户  用include check.php

代码大意就是 如果session为空 那么提示非法 但是发现这样安全性很差 请问还有什么好的思路和代码吗 多谢

新手没多少分 不好意思
------解决方案--------------------
$_SESSION[''admin_name]=="" 和session=="" 不一样吧
------解决方案--------------------
session_start();
$_SESSION['username']="123";
是php程序,不是表单能提交的!
当然,如果有人跑到你的服务器上修改你的程序,那就另当别论了

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template