|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-03-02 13:10 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 13:00:02 2025 UTC |
Description: ------------ I am attempting to make a login system, After a login, i the Login Page script At every secured page, i do an if statement to check if the cookie is there, before the information loads... The problem happens at the logout page, Cookie value refuse to change! Changes done to php.ini are just register_global and display_error Reproduce code: --------------- #================== # Login Page #================== function incTimeOut() { include "config/config_dat.php"; setcookie("session", "true", time()+$timeout); setcookie("session2", "true"); } //$timeout can be found in config_dat.php #================== # Logoff Page #================== function logout() { setcookie("session", "false", time()-10); setcookie("session2", "false", time()-10); } Expected result: ---------------- Expected to see both the cookie value becoming false after running the logout page. Actual result: -------------- I did an echo along the pages to see the cookie value, but unfortunately, session and session2 kept remaining at "true" (At all pages in that folder)