ID:               16102
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Analyzed
 Bug Type:         Session related
 Operating System: Windows 2000/XP
 PHP Version:      4.1.2
 New Comment:

This will be fixed in 4.2.0, probably.


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

[2002-03-15 23:39:48] [EMAIL PROTECTED]

I am having a similar problem. It seems that POST variables are not
getting set. It works in 4.1.1, and in the version of 4.1.2 available
at http://www.zend.com/zend/week/week77.php, but not in 4.1.2 from
http://www.php.net/downloads.php, nor in the version of 4.1.2 available
from http://www.php4win.com/builds/latest-build.php.

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

[2002-03-15 14:52:17] [EMAIL PROTECTED]

The script below works fine on PHP 4.1.1, but fails on 4.1.2.

The script sets two session variables. Only the most recent variable
seems to get set, with the previous variable getting reset.

-----Script-----

<html>
<body>
<?php
        session_start();

        $varTest1 = "";
        $varTest2 = "";

        session_register("TEST1");
        session_register("TEST2");

        if (isset($_POST['TEST1'])) {
                $varTest1 = $_POST['TEST1'];
                $_SESSION['TEST1'] = $_POST['TEST1'];
        }
        if (isset($_POST['TEST2'])) {
                $varTest2 = $_POST['TEST2'];
                $_SESSION['TEST2'] = $_POST['TEST2'];
        }

        if (!isset($_SESSION['TEST1'])) {
                $_SESSION['TEST1'] = "NOT SET";
        }

        if (!isset($_SESSION['TEST2'])) {
                $_SESSION['TEST2'] = "NOT SET";
        }

        foreach ($_SESSION as $varKey=>$varValue) echo "$varKey =>
$varValue</br>";

?>
        <form action="sesstest.php" method="POST">
<?php
        if (isset($_POST['SUBMIT1'])) {
?>
                <input type="text" value="<?php echo $varTest1; ?>" name="TEST1">
                <input type="SUBMIT" name="SUBMIT" value="Form1">
<?php
        } else {
?>
                <input type="text" value="<?php echo $varTest2; ?>" name="TEST2">
                <input type="SUBMIT" name="SUBMIT1" value="Form2">
<?php
        }
?>
        </form>
</body>
</html>

------Script End-------

The script should be saved as sesstest.php

The modules configured are GD and XSLT

If you need more information, please contact me.

--
Martin

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


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

Reply via email to