#39223 [Bgs]: $_Session and $_Get get confused
| From: | dgk at visskiss dot org | Date: | Sat, 21 Oct 2006 21:50:46 +0000 |
| Subject: | #39223 [Bgs]: $_Session and $_Get get confused | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-103855@lists.php.net to get a copy of this message | ||
ID: 39223
User updated by: dgk at visskiss dot org
Reported By: dgk at visskiss dot org
Status: Bogus
Bug Type: Session related
Operating System: Fedora
PHP Version: 5.1.6
New Comment:
please see bug report 39225
Previous Comments:
------------------------------------------------------------------------
[2006-10-21 21:31:35] tony2001@php.net
Disable register_globals.
------------------------------------------------------------------------
[2006-10-21 20:58:32] dgk at visskiss dot org
Description:
------------
I am getting session variables with the same value as the
$_GET variables... please advise
Reproduce code:
---------------
session_start();
$sesuid= $_SESSION['uid'];
//check for the _get
if (isset( $_GET['mid'])) {
$uid = $_GET['mid'];
} else if (isset( $_GET['uid'])) {
$uid = $_GET['uid'];
} else {
echo '<p class="error">You have reached this page in error (no model
selected).</p>';
}
$_SESSION['uid']=$sesuid;
Expected result:
----------------
$_GET['uid'] get's the value of $_SES['uid']
Actual result:
--------------
neither $_GET nore $_SES['uid'] should change
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39223&edit=1