Home > Backend Development > PHP Tutorial > Regarding the temporary processing method that the session cannot be automatically removed (reprinted) I have never used the SESSI_PHP tutorial

Regarding the temporary processing method that the session cannot be automatically removed (reprinted) I have never used the SESSI_PHP tutorial

WBOY
Release: 2016-07-20 11:03:58
Original
924 people have browsed it

Regarding the temporary solution to the problem that the session cannot be automatically removed
The problem is:
"PHP's session will always save the information entered when the user enters for the first time, even if you return to the login screen and log in again, it will not change! This I found the problem in php4.02, but it still failed in the latest php 4.03pl1 test! Only when the user closes the IE browser and reopens the IE window can the session content be eliminated
Temporary solution:
When the form After submission, do not register the variable submitted by the form. After assigning the variable to another variable $X, register $X. In this way, you can change it by returning to the login screen and logging in again. To be more safe, you can change it on the login page. Add a sentence at the top of the page to delete the variable $X.
For example: This is the login part of my chat room
1 The login page sends $name, $pass
2 This can be done in login.php
$save_name = $name;
$save_pass = $pass;
session_start();
session_register("name");
session_register("pass");
$name=$save_name;
$pass=$save_pass;
......
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445248.htmlTechArticleAbout the temporary processing method that cannot automatically remove the session: The PHP session will always be saved when the user first enters it. The information entered at the time, even if you return to the login screen and log in again...
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