|
Posted by Jerry Stuckle on 07/26/07 13:22
K. wrote:
> Hello!!!!
>
> I have a problems with sessions in mojavi technology.
>
> I have created a login panel to log into the system:
> Unfortunately sessions variable disappears while trying to click on any
> other <a href> link on my page and user has to log into the system many
> times.
> How to build a page to have session variables values available on every page
> on my system
> and how to avoid using $user->setAttribute('session_variable','value'); on
> every view file
> of every files stored in the system.
>
> session_start();
> $_SESSION["session_variable"] = "value";
>
> declared once should store the value of this session variable on every page
> and when I created
> clear PHP systems (without any more technology) based on the above code it
> was working well all the time.
>
> I heard that $user->setAttribute('session_variable','value') is equal as
> $_SESSION["session_variable"] = "value";
> but why it doesn`t work?
>
> How to do this on mojavi?
>
> Please help me
> Marcin from Poland
>
>
You need to call session_start() at the beginning of EVERY page which
uses sessions. The first page is not enough. But you don't need to set
your variable on every page - just set it once and you can retrieve it
on other pages.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|