Connecting Tech Pros Worldwide Help | Site Map

SESSIO variables

  #1  
Old July 17th, 2005, 02:29 PM
Wiert Dijkkamp
Guest
 
Posts: n/a
Wan a headache? Get mine!

The code
echo "<br>before: ".$_SESSION['var1'];// -> outputs the correct value
$_SESSION['var2'] = $something;
echo "<br>after: ".$_SESSION['var1'];// -> outputs another value

The obvious question: How can that be?

--
wiert
  #2  
Old July 17th, 2005, 02:29 PM
Oli Filth
Guest
 
Posts: n/a

re: SESSIO variables


Wiert Dijkkamp said the following on 06/06/2005 15:22:[color=blue]
> Wan a headache? Get mine!
>
> The code
> echo "<br>before: ".$_SESSION['var1'];// -> outputs the correct value
> $_SESSION['var2'] = $something;
> echo "<br>after: ".$_SESSION['var1'];// -> outputs another value
>
> The obvious question: How can that be?[/color]

Difficult to say unless you post the actual code!


--
Oli
  #3  
Old July 17th, 2005, 02:29 PM
Colin McKinnon
Guest
 
Posts: n/a

re: SESSIO variables


Wiert Dijkkamp wrote:
[color=blue]
> Wan a headache? Get mine!
>
> The code
> echo "<br>before: ".$_SESSION['var1'];// -> outputs the correct value
> $_SESSION['var2'] = $something;
> echo "<br>after: ".$_SESSION['var1'];// -> outputs another value
>
> The obvious question: How can that be?
>[/color]

because:

$ar=array();
$ar['var1']=1;
$ar['var2']=& $ar['var1'];
$ar['var2']='hello';
print $ar['var1'];

?

C.
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
AppDomain won't recycle on web.config change since 1.1 to 2.0 swit =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?= answers 10 March 27th, 2007 11:05 PM
Session contents lost despite Session.Timeout = 3000; and <sessionState mode="InProc" cookieless="false" timeout="300"> Carpe Diem answers 3 November 18th, 2005 05:36 AM
Best Way To Identify User / Shopping Cart Jason Burr answers 4 July 19th, 2005 10:15 AM