You are here: Re: Session inside a session « PHP Language « IT news, forums, messages
Re: Session inside a session

Posted by Stefan Rybacki on 10/20/05 21:34

Mikael Persson wrote:
> Hello there,
>
> I'm trying to find out, if its possible, how to start a second session that
> can only be alive as long as the first session is alive.
>
>
> example.
>
> An organisation logs in to my website. They get access to a main site.
> Inside this main area there are links to special areas. (maximum of one or
> two users can access each area) No user can access all areas. To solve this
> I want the specific user to log in from inside the main area.
>
> The user should only be able to access his special area if the main area
> session is active. Is it possible to start a session for the user while the
> main session is active?

Why don't you use the first session also for the second section? Just create a variable
like section2_logined=true and store it in the current session. Or if you find that more
comfortable just create a variable $_SESSION['SESSION_2']=array(); and store all your
needed information there.


Regards
Stefan

>
> regards,
>
> //Mikael Persson
>
>
>

 

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

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