Re: Set session by hand
| From: | Justin French | Date: | Mon, 28 Apr 2003 23:19:28 +0000 |
| Subject: | Re: Set session by hand | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145575@lists.php.net to get a copy of this message | ||
Ok, you're pretty confused here. Please send us a step-by-step list as to
what you're trying to achieve.
Justin
on 29/04/03 2:12 AM, Alexander BOYER (alex_boyer@hotmail.com) wrote:
> Hello,
>
> CONTEXT:
> I have two scripts : init.php, show.php
> * init.php sets $_SESSION['test'] = 'youpi' and prints session_id()
> * show.php starts session with session_id($_GET['my_sess_id']) and shows
> session variables echo $_SESSION['test'];
>
> PROBLEM:
> When i request init.php, then i request show.php?my_sess_id=XXXXXX, where
> XXXXX is what init.php has printed, it works.
> When i request init.php, then i request show.php?my_sess_id=XXXXXX FROM
> ANOTHER IP ADDRESS, the session is not loaded !!
>
> Is it normal ? Anyone have an idea to solve my problem ?
>
> SOURCES:
> init.php
> <?php
>
> session_start();
> $_SESSION['test'] = 'youpi';
> echo session_id();
> ?>
>
> show.php
> <?php
> session_id($_GET['my_session_id']);
> session_start();
> echo $_SESSION['test']; //print nothing
> echo session_id() ; //print $_GET['my_session_id']
> ?>
>
>