You are here: Re: How to call the session variable? « PHP Programming Language « IT news, forums, messages
Re: How to call the session variable?

Posted by Peter Pei on 01/14/08 04:18

"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:7L2dncKoA9SWTxfanZ2dnUVZ_o_inZ2d@comcast.com...
> Kurda Yon wrote:
>> Hi,
>>
>> As you have recommended I did not use the session_register(). In one
>> file I have executed such line:
>> $_session['ex'] = 2.0;
>>
>> Then, in another file, I have executed the following line:
>> $ex = 3.0.
>>
>> And than I have noticed that the previous assignment is seen
>> everywhere (on other pages). So, as far as I understood, after the
>> usage of $_session['ex'] = 2.0, the $ex variable becomes a session
>> variable. Moreover, $ex and
>> $_session['ex'] variables are the same variable! In other words, I
>> have to call $_session['ex'] just the first time. After I did it once
>> I can use just $ex (instead of $_session['ex']). Is that true?
>>
>
> No. $_SESSION['ex'] (NOT $_session['ex'] - case IS important!) just sets
> the value in the array. Nothing more, nothing less.
>
> $ex is a completely different variable, completely unrelated to the value
> in the $_SESSION array.
>
> It's no different than having $abc and my_array['abc']. Two entirely
> different variables.
>
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация