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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dgk at visskiss dot org
New email:
PHP Version: OS:

 

 [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: Sat Apr 20 02:01:29 2024 UTC