Home > Backend Development > PHP Tutorial > php中sesiion有关问题

php中sesiion有关问题

WBOY
Release: 2016-06-13 12:08:42
Original
1024 people have browsed it

php中sesiion问题
下面是我的登陆界面和提交页面的代码,我不管输入的的用户名和密码正确与否,登陆界面都不进行替换,登陆界面的if-else好像没用一样,求解,怎么进行登陆成功后表单进行替换!!
------解决思路----------------------

<br /><br />//php5.3 不支持 session_register() 此函数已删除,看看你的php版本是多少。<br />//赋值可以用下面的方法<br />$_SESSION['name'] = $username;<br /><br />
Copy after login

------解决思路----------------------
session['name']是个字符串,你同过intval之后肯定是0 ,所以你没必要用intval函数处理否则上边if永远成立

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