|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-02-04 13:55 UTC] tboardma at indiana dot edu
[2003-02-13 02:18 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 09:00:01 2025 UTC |
I have a script that saves information to a session variable and then sends the session_id to another script via POST, which does something, then sends data to another PHP script by silent POST, including the session_id, which is to retrieve the original values saved in the session, specified by it's original session_id. 1st PHP script: $USER_FORM = "a bunch of text"; session_register("USER_FORM"); $sess = session_id(); exit; 2nd PHP script: /* We want to start our session from a session id that is passed to us in POST data */ $sess = $HTTP_POST_VARS['sess'}; ini_set("session.auto_start", "0"); ini_set("session.cache_limiter", "public"); session_id($sess); session_start(); global $USER_FORM; /* Instead of printint the "bunch of text", it prints nothing */ print $USER_FORM; This same code worked using PHP 4.0.6 running on UNIX. In my php.ini, I have session_auto_start set to true, which is why I turn it off by setting the ini in the 2nd script. Register globals is on.