ID:               24810
 Updated by:       [EMAIL PROTECTED]
 Reported By:      dkaplan1 at uiuc dot edu
-Status:           No Feedback
+Status:           Feedback
 Bug Type:         Session related
 Operating System: Solaris SunOS 5.9
 PHP Version:      4.3.1


Previous Comments:
------------------------------------------------------------------------

[2003-07-27 13:23:57] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



------------------------------------------------------------------------

[2003-07-25 16:31:54] dkaplan1 at uiuc dot edu

Description:
------------
Data that is newly written to the session hash is not getting stored
correctly.  If I am storing two pieces of data (a string and a type of
view for example) in the session hash, the hash should only contain the
latest values of those two variables.  Instead, as in the example
provided, the form randomly changes between the views, and the data
shown is not always the latest in the hash.  Usually, it is from
previous submissions.  
This seems to be a problem in IE and Netscape, but not in Mozilla.

Reproduce code:
---------------
<?
session_cache_limiter('public');
session_start();
if (isset($_POST['submit'])) {
  $_SESSION['data']=$_POST['data'];
} if (isset($_GET['form'])) {
  $_SESSION['form']=$_GET['form'];
} if (!isset($_SESSION['form'])) {
  $_SESSION['form']='basic';
} if ($_SESSION['form']=='basic') {
  echo 'The value of the variable is '.$_SESSION['data'];
} if ($_SESSION['form']=='advanced') {
  echo 'Here is a complete dump of the session hash ';
  var_dump($_SESSION);
}
?><br><br>
<a href=bug.php?form=basic>Basic</a><br><a
href=bug.php?form=advanced>Advanced</a><br>
<form method=post action=bug.php>Data: <input type=text name=data
value="">
<input type=submit name=submit value=submit></form>


Expected result:
----------------
When you type in a value, it should appear.  When you switch views, the
data value should stay the same, only the view changes.  When you enter
different data, only the data changes, the view stays the same.

Actual result:
--------------
View randomly changes and data is not always last entered.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24810&edit=1

Reply via email to