note 20375 added to ref.session
| From: | mikebailey1 at compuserve dot com | Date: | Mon, 01 Apr 2002 21:30:43 +0000 |
| Subject: | note 20375 added to ref.session | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28473@lists.php.net to get a copy of this message | ||
Using PHP 4.1.2 on IIS 5.0, Win2k, haven't migrated app yet to Linux (later!)
Managed to eventually get the sessions to work as follows.
In the php.ini, session.auto_start = 1
Then without a session_start();
$xvar = "something" ;
Use
session_register("xvar");
then u CAN retrieve from a later page using the new way:
$var = $_SESSION["xvar"] ;
also without session_start();
even doing a var_dump($_SESSION); seems to work at least some of the time!
The odd thing is that storing vars using the new way:
$_SESSION["xvar"] = "something";
will save only for the CURRENT page, this gets lost when moving on to the next page!
best regards
Mike
--
http://www.php.net/manual/en/ref.session.php
http://master.php.net/manage/user-notes.php?action=edit+20375
http://master.php.net/manage/user-notes.php?action=delete+20375
http://master.php.net/manage/user-notes.php?action=reject+20375