Re: New Session Ids generated with each page request

From: Date: Thu, 11 Sep 2003 14:01:41 +0000
Subject: Re: New Session Ids generated with each page request
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-162296@lists.php.net to get a copy of this message
From: "Golawala, Moiz M (IndSys, GE Interlogix)" <Moiz.Golawala@ge.com> > My problem is that I get a new Session Id with every > request I send to the server. For that reason I am unable > to share variables between pages using sessions. (I get a > new session Id even I refresh the same page). The code > below prints out different session id for "page1.php" and > "page2.php". Can someone please help me figure out what > would be causing this. > > on page1.php I have the following code: > <?php > session_start(); > echo SID > ?> > <a href="page2.php">Next page </a> > > on page2.php I have the following code > <?php > session_start(); > echo SID > ?> Your browser is not accepting the session cookie for some reason. Change your link to this: <a href="page2.php<?=SID?>">Next Page</a> and it'll work. You'll either have to pass the SID in every link/form, or figure out why cookie aren't working. ---John Holmes...

« previous php.general (#162296) next »