Re: Passing the session question

From: Date: Wed, 21 Apr 2004 03:46:46 +0000
Subject: Re: Passing the session question
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-23507@lists.php.net to get a copy of this message
However the following scenerio will not pass the session id.... Or atleast I can't seem to get it to work. /* Page1.php */ <?php Session_Start(); ?> /* Page2.php */ <?php Session_Start(); ?> Echo SID; Any ideas?
First of all, read the manual: http://www.php.net/manual/en/ref.session.php You need to pass the session information from Page1.php to Page2.php (cookies are often used for this). Is your session cookie being set? You could also pass around the session variable through the url, something like: /* Page1.php */ <?php session_start(); ?> <p> To continue, <a href="Page2.php?<?php echo strip_tags(SID); ?>">click here</a>. </p>

« previous php.windows (#23507) next »