You are here: Re: Sessions « PHP Language « IT news, forums, messages
Re: Sessions

Posted by Stefan Rybacki on 07/13/05 17:55

roN @ work wrote:
> Hi,
>
> I start a session (session_start();) and then I display a form where users
> can enter their access-data.
> If the data are okay I'm gonna display a link where I use a pointer defined
> in the first file as well. I tried to pass the pointer like:
> $_SESSION['mbox']= $mbox; but in the secondfile where I placed a
> session_start(); at the start as well I get "Notice: Undefined index: mbox
> in /srv/www/htdocs/web2/html/php/nospam/pop.php on line 166" after the line:
> $mbox = $_SESSION['mbox'];
> why?
> Do I got to pass the SID to the 2nd file as well? How? And how to use it in
> the 2nd file?
Yes. With cookies or by adding session_name().'='.session_id() as GET parameter to a link
or if you POST data by inserting a hidden field with the name of the session and the id.
You use it just with calling session_start(); at the beginning.

Regards
Stefan


> Thank you!
>
> --
> chEErs roN
> I'm root. I'm allowed to do this! ;)
> keep on rockin'
>
>

 

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

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