php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39223 $_Session and $_Get get confused
Submitted: 2006-10-21 20:58 UTC Modified: 2006-10-21 21:50 UTC
From: dgk at visskiss dot org Assigned:
Status: Not a bug Package: Session related
PHP Version: 5.1.6 OS: Fedora
Private report: No CVE-ID: None
 [2006-10-21 20:58 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-21 21:31 UTC] tony2001@php.net
Disable register_globals.
 [2006-10-21 21:50 UTC] dgk at visskiss dot org
please see bug report 39225
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 14:01:30 2024 UTC