Home  >  Article  >  Backend Development  >  注销登录html与php,该怎么解决

注销登录html与php,该怎么解决

WBOY
WBOYOriginal
2016-06-13 10:15:241166browse

注销登录html与php

欢迎您

  注销等点击时,跳转到登录界面,并注销session
unset($_SESSION['login']);
session_destory();
?>
这段应该放在哪?

------解决方案--------------------
session_start();
unset($_SESSION['login']);
session_destory();
................
------解决方案--------------------
当然是在 注销 的目标页面中
------解决方案--------------------
给注销一个连接地址
注销
在unset.php中写入
unset($_SESSION['login']);
session_destory();
?>

------解决方案--------------------
凡是要用到 会话的地方,开头都要session_start()

在a页面点击返回到student.php时,会话依然存在吗?//会存在
Statement:
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