Help - Search - Member List - Calendar
Full Version: Sessions
WorkTheWeb Forums > Webmaster Resources > PHP Help
Support our Sponsors!
roN @ work
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?
Thank you!

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

Stefan Rybacki
roN @ work wrote:
QUOTE
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


QUOTE
Thank you!

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




PHP Help | Linux Help | Web Hosting | Reseller Hosting | SSL Hosting
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2006 Invision Power Services, Inc.