Reply to Re: mojavi sessions problem

Your name:

Reply:


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
==================

[Back to original 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

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