note 77104 added to ref.session

From: Date: Wed, 15 Aug 2007 15:08:37 +0000
Subject: note 77104 added to ref.session
Groups: php.notes 
Request: Send a blank email to php-notes+get-129497@lists.php.net to get a copy of this message
I was having problems with sessions being changed weirdly in my site. I used to put 'id' in $_SESSION when the user logs in using : $_SESSION['id'] = value; And i used another variable called $id, i thought this never causes problems, but i did have problems(i put some id in the session, and when i refresh the page and try to grab the value back, i get another id) so i just replaced all $_SESSION['id'] by $_SESSION['sess_id'] and left the $id as is. This solved all problems. Note: While debugging this site on my local machine (i use WAMP) i never have this problem i can use $id and $_SESSION['id'] apart from each other. My php version is 5.2.3 The server's PHP version is 5.1.6 Is this a matter of versions?? ---- Server IP: 69.147.83.197 Probable Submitter: 62.135.22.142 ---- Manual Page -- http://www.php.net/manual/en/ref.session.php Edit -- https://master.php.net/note/edit/77104 Del: integrated -- https://master.php.net/note/delete/77104/integrated Del: useless -- https://master.php.net/note/delete/77104/useless Del: bad code -- https://master.php.net/note/delete/77104/bad+code Del: spam -- https://master.php.net/note/delete/77104/spam Del: non-english -- https://master.php.net/note/delete/77104/non-english Del: in docs -- https://master.php.net/note/delete/77104/in+docs Del: other reasons-- https://master.php.net/note/delete/77104 Reject -- https://master.php.net/note/reject/77104 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129497) next »