Connecting Tech Pros Worldwide Help | Site Map

SESSIO variables

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 01:29 PM
Wiert Dijkkamp
Guest
 
Posts: n/a
Default SESSIO variables

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, 01:29 PM
Oli Filth
Guest
 
Posts: n/a
Default 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, 01:29 PM
Colin McKinnon
Guest
 
Posts: n/a
Default 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.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.