note 54655 added to ref.session

From: Date: Mon, 11 Jul 2005 17:41:11 +0000
Subject: note 54655 added to ref.session
Groups: php.notes 
Request: Send a blank email to php-notes+get-91777@lists.php.net to get a copy of this message
And odd bug happens if you're not extremely clean with your css declarations. If you concatenate a value onto a session variable via $_SESSION['varname'] .= "morestuff"; and you have this in your <body> style definiton: background-image: url(); background-repeat: no-repeat; the value you write to the session variable will be saved to the session variable TWICE. I.e. <?php session_start(); $_SESSION['varname'] .= "addon"; echo $_SESSION['varname']; ?> with a body tag like this: <body style="background-image: url(); background-repeat: no-repeat;"> will output: "addon" the first visit, and then "addonaddonaddon" on the subsequent hit, and add two "addon"'s every hit to the page. ---- Manual Page -- http://www.php.net/manual/en/ref.session.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+54655 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54655&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54655&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54655&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54655&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54655&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54655&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+54655&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#91777) next »