> setting up some pages to allow users to log in, and store their userID in a > session var. > for development purposes, i've installed AMP on my windows box. > > -everything parses fine > -register globals is on. > > problem: session vars do not seem to be carrying over pages, even when i set > the session_id to initial value. > > i start the session and save the variable: > > session_start(); > > $PHPSESSID=session_id(); > > $_SESSION['userID'] = $userID; //i've checked and $userID DOES contain a > value: 1 > //If i echo $_SESSION['userID']; then it prints 1. > > > header("Location: nextpage.php?PHPSESSID=$PHPSESSID"); > > exit; > > > on nextpage.php: > > session_start(); > > session_id($PHPSESSID);
Please note the second sentence in this direct quote from the manual: If id is specified, it will replace the current session id. session_id() needs to be called before session_start() for that purpose. Depending on the session handler, not all characters are allowed within the session id. For example, the file session handler only allows characters in the range a-z, A-Z and 0-9! Thank you. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php